Fall 2020 (Section 8, 83275) - 3 credit hours
JMU CS149 - Introduction to Programming
Help Policies Solutions Study-Aids Tools
Syllabus


Description: An algorithm is a procedure for finding the correct solution to a problem (in a finite amount of time). For the purposes of this course, a program is an algorithm (or heuristic) that has been written in an imperative programming language (i.e., language that is or can easily be converted into instructions that can be executed by a digital computer). This course is an introduction to the theory and practice of writing programs.

Since the algorithms developed in this course are relatively simple, most of the attention is on how to specify them formally and correctly in a programming language. However, attention is also given to algorithmic problem solving and the kinds of recurring patterns that arise.

Though this course uses one particular programming language, the concepts are applicable across a wide variety of programming languages. Hence, students are expected to leave this course knowing the specific programming language, the general concepts, and the vocabulary of programming.

Textbook: The main textbook for this course is:

Downey, A.B. and C. Mayfield (2020) Think Java: How to Think Like a Computer Scientist (2nd Ed.) , O'Reilly Media.

which is denoted by D&M below. It is available online in a number of formats and from the JMU Bookstore. The other textbook is:

Bernstein, D. (2020) Patterns for Beginning Programmers .

which is denoted by B below. It is available online. (Note that there are multiple editions of this book. You should be sure to use this one, though your friends in other sections may use a different one.)

You are expected to complete all reading assignments before the first day they are discussed/used.

Outline: This course is organized as follows (though specific topics and dates may change).

Lectures in this course will be delivered on-line during scheduled meeting times. Students may participate in lectures synchronously, or watch a recording asynchronously (at any time after it has been delivered).

Some course meeting times will be devoted to face-to-face discussion/question-and-answer sessions. For these sessions, students have been divided into two groups/cohorts, purple and gold. Students may attend these sessions only with their assigned cohort. When the other cohort is meeting, you may use the time as you see fit.

Exams will be delivered on-line during scheduled exam times.

Readings are listed in the right-most column.

Part I: Introduction to Algorithms and Programming
8/26 Algorithms and Programming D&M1.1-1.2
8/28 Algorithms and Programming D&M1.1-1.2
Part II: Memory/Storage
8/31 Data Types and Variables and Literals D&M 2.1-2.3
9/2 The Assignment Operator , Using Arrays and Programming Pattern: Swapping D&M 7.1-7.4; B 1
9/4 Implicit and Explicit Type Conversion
Part III: Arithmetic Operators
9/7 Arithmetic Operators and Programming Pattern: Updating D&M 2.5-2.6; B 2
9/9 Programming Patterns: Digit Manipulation , Arithmetic on a Circle and Truncation B 3-5
Part IV: Modularity and Decomposition
9/11 Methods and Modularity D&M 4
Part V: Program Construction and Input/Output
9/14 Developing Programs in Java and Console Input and Output Basics D&M 1.3-1.9, 2.9-2.10 and D&M 3.1, 3.5
9/16 Lab: (1) Experimenting with jGRASP , Skills - Using Autolab and Skills - Command Line Arguments
Part VI: Conditional Algorithms/Programs
9/18 Logical Operators , Relational Operators and Conditions and Decisions D&M 5
9/21 Lab: (2) Gaining Experience with Conditions and Decisions , Skills - Editing Programs and Skills - Using a Command Shell
9/23 Programming Patterns: Indicators , Indicator Methods , Rounding , Starts and Completions and Digit Counting B 6-9,11
9/25 Basics of Testing and Debugging and Testing and Debugging Conditional Programs
9/28 Lab: (3) Skills - Using a Debugger and Experimenting with Debugging Conditional Programs
9/30 Lab: (4) Skills - Test Harnesses
10/2 Question and Answer Session
10/5 Written Portion of Exam 1
10/7 Computer-Based Portion of Exam 1
Part VII: Iterative Algorithms/Programs
10/9 Repetition and Looping and Testing and Debugging Iterative Programs D&M 6.1-6.4, 7.8
10/12 Programming Patterns: Reprompting , Accumulators and Accumulator Arrays B 12-14
10/14 Lab: (5) Experimenting with Loops
10/16 Programming Patterns: Look-up Arrays , Interval Membership , Conformal Arrays and Segmented Arrays B 15-18
10/19 Lab: (6) Gaining Experience with Nested and Sequential Loops
Part VIII: Introduction to Object-Oriented Programming
10/21 Creating and Using Objects D&M 9.1, 6.7-6.11
10/23 Strings and Arrays Revisited D&M 7.1-7.4
10/26 Console I/O Revisited
10/28 Lab: (7) Gaining Experience Using Objects
10/30 Objects and References D&M9-10
11/2 Lab: (8) Experimenting with Reference Types (Parts 1, 2, 3)
11/4 Objects and References (cont.) and Parameter Passing
11/6 Parameter Passing (cont.) and Question and Answer Session
11/9 Written Portion of Exam 2
11/11 Computer-Based Portion of Exam 2
Part IX: Developing Classes
11/13 An Introduction to Developing Classes and Information Hiding and D&M 11
11/16 Developing Classes with Static Members and D&M 11
11/18 UML Class Diagrams and Overloaded Methods
11/20 Lab: (9) Gaining Experience with: Developing Classes , Information Hiding and Overloading
11/30 Lab: (10) Experimenting with Static Attributes and Methods
12/2 Lab: (11) Experimenting with Reference Types (Part 4)
12/4 Arrays and References D&M 12
12/7 Lab: (12) Experimenting with Arrays and References
12/9 Mutability and Immutability Revisited
Part X: Final Examination
12/16 Final Exam (10:30-12:30)

Attendance at discussion/question-and-answer sessions is not mandatory. You should complete the readings on a topic before it is covered for the first time.

Grading: Final grades will be based on your performance on: 2 mid-term exams (20% each) , 1 final exam [during the exam period] (25% total) , several quizzes (15% total) , several small programming assignments (15% total) and 1 final programming assignment (5% total).
Quizzes: 10 quizzes will be assigned during the semester. Note that their due dates are subject to change. Note also that the links to assignments on Canvas will only work if you first login to Canvas.
Quiz 1; Due: 8/31 11:00PM(Algorithms without Computers)
Quiz 2; Due: 9/7 11:00PM(Variables, Literals, Assignment and Using Arrays)
Quiz 3; Due: 9/11 11:00PM(Arithmetic Operators)
Quiz 4; Due: 9/18 11:00PM(Methods and Modularity)
Quiz 5; Due: 9/24 11:00PM(Understanding of PA1)
Quiz 6; Due: 9/28 11:00PM(Logical and Relational Operators)
Quiz 7; Due: 10/14 11:00PM(Loops)
Quiz 8; Due: 10/21 11:00PM(Some Programming Patterns)
Quiz 9; Due: 10/28 11:00PM(Using Classes and Objects)
Quiz 10; Due: 11/18 11:00PM(Developing Classes and Information Hiding)

Make sure you read and understand all of the policies related to homework assignments.

Programming Assignments: 12 programming assignments will be assigned during the semester. Note that their due dates are subject to change.
Programming Assignment 1 ; Due: 9/21 11:00PM(Variables, Arithmetic Operators, Command-Line Arguments, and Method Calls)
Programming Assignment 2 ; Due: 9/25 11:00PM(Multiple Command-Line Arguments and Modularity)
Programming Assignment 3 ; Due: 9/30 11:00PM(Integer Arithmetic)
Programming Assignment 4 ; Due: 10/2 11:00PM(Logical Operations and Conditions)
Programming Assignment 5 ; Due: 10/12 11:00PM(Unit Testing and Debugging)
Programming Assignment 6 ; Due: 10/16 11:00PM(Using What You've Learned So Far)
Programming Assignment 7 ; Due: 10/23 11:00PM(Iteration and Arrays)
Programming Assignment 8 ; Due: 10/30 11:00PM(Using Strings)
Programming Assignment 9 ; Due: 11/4 11:00PM(Arrays and Accumulators Revisited)
Programming Assignment 10 ; Due: 11/6 11:00PM(I/O and Using Objects)
Programming Assignment 11 ; Due: 11/16 11:00PM(Implementing a Class of Immutable Objects)
Programming Assignment 12 ; Due: 11/20 11:00PM(Implementing a Class of Immutable Objects that has a Static Method)

Make sure you read and understand all of the policies related to programming assignments. Programming assignments may not be submitted after the due date/time (in other words, you will receive a grade of 0 on any programming assignment that is not submitted on time).

Final Programming Assignment: The final programming assignment has two parts:
Part A: Due 12/2 11:00PM (Understanding the Problem)
Part B: Due 12/11 11:00PM (Implementing a Solution)

Both parts are described in the same document.

Office Hours: You may meet (either face-to-face or virtually, depending on the situation and schedule) with Prof. Bernstein during his scheduled office hours or you may schedule an appointment with him. Teaching assistants are available for individual help and a "Fourth Hour" of instruction on-line. Their hours and the process they are using are both described on the Department's Wiki.

Copyright 2020