C O U R S E O U T L I N E CS 151 Computer Science I Spring Semester, 2008 2007/08 Catalog data: First course in Computer Science. Introduces the fundamental concepts of computer programming with an object-oriented language with an emphasis on analysis and design. Topics include data types, selection and iteration, instance variables and methods, arrays, files, and the mechanics of running, testing and debugging. Prerequisites: MATH 119. Textbook: John Lewis and William Loftus, Java Software Solutions, fifth edition, Addison-Wesley, 2006. Instructor: Neli P. Zlatareva, Ph.D., Professor of Computer Science. Office MS 30304 Phone (860) 832-2723. E-mail zlatareva@ccsu.edu Course Web side http://www.cs.ccsu.edu/~neli/ Office hours TR 2:30 p.m.-3:30 p.m.,4:45 p.m.–5:15 p.m. MW 12:50 a.m. - 2:00 p.m. Course Objectives: Having completed this course successfully, the student should - Understand the basic principles of object-oriented programming. - Design and debug Java programs using basic control structures (linear, iteration and selection). - Define Java objects, methods and classes and use them in definite application settings. - Understand and utilize arrays and text files. - Learn how to solve non-trivial problems, and how to implement their solutions. Class topical outline and assignments for the week: Week 1 January 22 - January 25 - Introduction to computer systems and computer languages. - Binary numbers. - Assignments: *) Read Sections 1.1, 1.2, and 1.3. **) Review Appendix B. ***) Ensure an access to the Micro Lab by obtaining an account on NT computers. ****) Install JAVA on your home computer. Download from http://www.sun.com if JAVA disk is not available. Week 2 January 28 – February 1 - Introduction to Java language and Object-Oriented Programming. - Writing and running Java programs. Comments, identifiers and reserved words. - Assignments: *) Read Sections 1.4, 1.5, and 1.6. **) Do Self-Review Questions from Chapter 1. ***) Test your JAVA software with provided on the course Web site examples to ensure that it works properly. Week 3 February 4 - February 8 - Character strings. - Primitive data types. Variables. The assignment statement and arithmetic operators. - Data conversion. - Interactive programs. The Scanner class. - Assignments: *) Submit homework #1. **) Review Lab 1 problems 1 and 2 (see course Web site). ***) Study Chapter 2, and do Self-Review questions from Chapter 2. Week 4 February 11 - February 14 - Introduction to objects, classes, class libraries and packages. - Formatting output. - Wrapper classes. - Assignments: *) Study Chapter 3 (except for Sections 3.7, 3.9, 3.10, and 3.11). Note: applets and GUIs will be covered in CS 152. **) Do Self-Review Questions from Section 3. Week 5 February 19 – February 22 - Boolean expressions. Increment, decrement and logical operators. - Conditionals: the if - else statement. - Loops: the while statement. - Assignments: *) Submit homework #2. **) Do Lab 2 problems 1 and 2. ***) Study Sections 5.1, 5.2, 5.3, and 5.5. Week 6 February 25 - February 29 - Loops continued. The do and for statements. - Nested loops. - Assignments: *) Do Lab 2 problems 3, 4, 5 and 6. **) Do Self-Review Questions from Chapter 5. ***) Study Sections 5.7 and 5.8, and review Chapters 1, 2, and 3 in preparation for Test #1. Week 7 March 3 – March 7 - Test #1. - The switch statement. - Assignments: *) Submit homework #3. **) Study Section 5.4 ***) Do Lab 3 problems. Week 8 March 10 - March 14 - More about JAVA classes. Writing user-defined classes and methods. - Encapsulation and visibility modifiers. - Assignments: *) Study Sections 4.1, 4.2, 4.3, and 4.4 **) Do Self-Review Questions from Chapter 4. Week 9 March 24 – March 28 -------------------------------------------------------------------------- | NOTE: March 25 is the last day to withdraw from classes. | -------------------------------------------------------------------------- - Classes continued. Parameter passing. - Static variables and static methods. - Dependencies among classes, and dependencies among objects of the same class. - Assignments: *) Submit homework #4. **) Study Sections 6.1, 6.2, 6.3, and 6.4 Week 10 March 31 - April 4 - Interfaces. - Method overloading. - Enumerated types. - Assignments: *) Study Sections 3.7, 6.5, 6.6, 6.7, 6.8, and 6.9 **) Do Self-Review questions from Chapter 6, and review Chapters 4 and 6 in preparation for test #2. Week 11 April 7 - April 11 - Test #2. - Reading from a text file and writing to a text file. - Introduction to BlueJ. - Assignments: *) Submit homework #5. **) Study Section 5.6 ***) Download and install BlueJ from www.bluej.org Week 12 April 14 - April 18 - Arrays of primitive types. - Assignment: *) Study Sections 7.1 and 7.2. Week 13 April 21 - April 25 - Arrays of objects. - Command-line arguments. - Assignment: *) Study Sections 7.3 and 7.4 Week 14 April 28 - May 2 - Dynamic arrays (vectors) and multidimentional arrays. - Assignment: *) Submit homework #6. **) Study Sections 7.5, 7.6, 7.7, and 7.8 ***) Do Self-Review Questions from Chapter 7. Week 15 May 5 - May 7 - Introduction to class hierarchies. - Review. - Assignment: *) Prepare for the final exam. Review tests 1 and 2, quizzes, lab and homework projects. Pay special attention to arrays. Tests and quizzes: There will be two tests and five quizzes during the semester designed as evaluation devices intended to prompt the student to stay abreast of assigned topics. Test dates are announced in advance, while quizzes may be given at any time without a preliminary announcement (typically every second week). No make-ups for missed quizzes will be granted. Make-ups for missed tests will only be granted in exceptional cases, after a preliminary arrangement (before the test takes place - a phone call, or an e-mail message explaining the reason for missing the test will do). NO EXTRA WORK TO COMPENSATE FOR A POOR PERFORMANCE ON TESTS OR QUIZZES WILL BE GIVEN, except for the extra 5 points already included into the grading formula. Final exam: This will be a cumulative objective test of the entire semester's course offerings. Class discussion: Since the style of the class sessions will be interactive, the student is expected to come to the class with prepared questions, comments and answers to the assigned exercises. Homeworks: The student will be assigned six official homeworks. The student is responsible for constructing a set of test cases which covers all of the possibilities inherent in that program assignment. The student must submit in a folder with student name and class section the following documentation for each program: a pseudo code or a flowchart of the problem's solution (whichever is preferred or appropriate; homework 6 must include also BlueJ charts), a listing of the program, a hardcopy of ALL runs of the program which are needed to demonstrate the correctness of the program, the disk with the program, and all relevant files needed to successfully run the program. Homeworks will be graded upon degree of success, precise implementation of the theoretic concepts, and use of an appropriate program structure. All homework assignments must be submitted by the due date. There will be a penalty for late submissions. To successfully complete the course, all homework assignments must be submitted. Academic honesty: All homework and other written assignments must be an individual effort of the student submitting the work for grading. See the section "Policy on Academic Honesty" in the CCSU Student Handbook. Attendance: It is expected that the student will attend class sessions regularly. Absences result in the student being totally responsible for the make-up process. Student conduct: It is expected that all students will conduct themselves in a respectful manner, and will assist in maintaining an atmosphere conductive to learning in the classroom. Grades and evaluation: The student will be evaluated regularly during the semester as follows - Test 1: 15 points. It provides 15% of the final grade. - Test 2: 15 points. It provides 15% of the final grade. - Quizzes 1, 2, 3, 4, and 5: 2 points each. They provide 10% of the final grade. - Homeworks 1, 2, 3, and 4: 5 points each. Each provides 5% of the final grade. - Homeworks 5 and 6: 10 points each. Each provides 10% of the final grade. - Final exam: 25 points. It provides 25% of the final grade. Maximum points: 105, 5 of which are bonus points. The final grade for the course will be defined as follows: Total points Final grade ------------ ----------- 94 - 105 A 90 - 93.99 A- 87 - 89.99 B+ 84 - 86.99 B 80 - 83.99 B- 77 - 79.99 C+ 74 - 76.99 C 70 - 73.99 C- 67 - 69.99 D+ 64 - 66.99 D 60 - 63.99 D- below 60 F