CS 151 - Computer Science I

Fall-2023

Classes: MW 1:40pm - 2:55pm, Maria Sanford Hall 308
Instructor: Dr. Zdravko Markov, 30307 Maria Sanford Hall, (860)-832-2711, http://www.cs.ccsu.edu/~markov/, e-mail: markovz at ccsu dot edu
Office hours: MW 4:20pm - 5:30pm, TR 1:30pm-3:00pm, in person. Book an appointment here.

Catalog description: 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 152 (may be taken concurrently)

Course Learning Outcomes:

  1. Learn the basic principles of object-oriented programming and the resources available to help them write JAVA programs (editors, JAVA libraries, on-line help manuals, and JAVA development environments).
  2. Learn the basic programming constructs, namely primitive data, variables, assignment statement, arithmetic operators, parameter passing.
  3. Learn the main control structures, namely Boolean expressions, conditional statements, loops.
  4. Understand and implement Java classes and use them in definite application settings. Understand the ideas of abstraction and encapsulation, and incorporate them into program design.
  5. Understand and utilize text files and basic input/output operations.
  6. Learn arrays of primitive data and arrays of objects.
  7. Learn how to interpret non-trivial application problems (problem analysis) and translate them into pseudo-code (program design) before implementing them in JAVA.
Required textbook: Lewis & Loftus, Java Software Solutions: Foundations of Program Design, 9-th Edition, Addison-Wesley, 2017.

Required software: BlueJ - an integrated Java programming environment (http://www.bluej.org/)

Class Participation: All students are expected to attend class sessions regularly. If you must miss a test, try to inform the instructor of this in advance. In case of missed classes and work due to plausible reasons (such as illness or accidents) limitted assistance will be offered. Unexcused absences will result in the student being totally responsible for the make-up process.

Assignments: Reading and problem assignments are listed in the schedule of classes. Some of the problems will be worked in class. Self-review questions, exercises and programming projects under the Assignment section don't have to be turned in, but are recommended.

Tests: There will be 5 quizzes, two tests and a final exam. They will include material from the textbook, the lectures, and the programming projects.

Programming projects: There will be 6 programming projects requiring the use of BlueJ to write and run Java programs. The projects with their due dates are listed below in the schedule of classes (the project descriptions are given in Blackboard). All projects must be submitted through Blackboard.

Honesty policy: The CCSU honor code for Academic Integrity is in effect in this class. It is expected that all students will conduct themselves in an honest manner and NEVER claim work which is not their own. Violating this policy will result in a substantial grade penalty, and may lead to expulsion from the University. You may find it online at http://web.ccsu.edu/academicintegrity/. Please read it carefully.

Grading: The final grade will be based on projects (50%), quizzes (10%), tests (20%), and the final exam (20%), and will be affected by classroom participation, conduct and attendance. All grades will be availabe from Blackboard. The letter grades will be calculated according to the following table:
A A- B+ B B- C+ C C- D+ D D- F
95-100 90-94 87-89 84-86 80-83 77-79 74-76 70-73 67-69 64-66 60-63 0-59

Unexcused late submission policy: Projects submitted more than two days after the due date will be graded one letter grade down. Projects submitted more than a week late will receive two letter grades down. No submissions will be accepted more than two weeks after the due date.

Students with disabilities: Students who believe they need course accommodations based on the impact of a disability, medical condition, or emergency should contact me privately to discuss their specific needs. I will need a copy of the accommodation letter from Student Disability Services in order to arrange class accommodations. Contact Student Disability Services, Willard Hall, 101-04 if you are not already registered with them. Student Disability Services maintains the confidential documentation of your disability and assists you in coordinating reasonable accommodations with your faculty.

Schedule of classes, projects and tests (organized by topic, each covered in 1-3 classes)

Note: Dates for classes, tests, quizzes, and projects will be posted at due time (see also University Calendar). Additional material may be posted. Check the schedule regularly for updates!
  1. Aug 30, Sep 6: Introduction to computers and programming
  2. Sep 11, 13: Java language and Object-Oriented Programming
  3. Sep 18, 20, 25: Data and Expressions
  4. Sep 27, Oct 2, 4: Using classes and objects
  5. Oct 9, 11: Decision making and Loops
  6. Oct 16, 18, 23: Loops continued
  7. Oct 25: Test 1 (Chapters 2, 3, 5, 6)
  8. Oct 30, Nov 1: Writing classes
  9. Nov 6, 8: Java classes continued
  10. Nov 13: Still more Java classes
  11. Nov 15: Test 2 (Chapters 4 and 7)
  12. Nov 20: Working with text files
  13. Nov 27, 29: Arrays
  14. Dec 4, 6: Arrays of objects
  15. December 13, 1:00pm - 3:00pm: Final Exam (see Review topics and sample problems)

Programming Project 0

Log on to Blackboard Learn to see and submit the project.

Programming Project 1

Log on to Blackboard Learn to see and submit the project.

Programming Project 2

Log on to Blackboard Learn to see and submit the project.

Programming Project 3

Log on to Blackboard Learn to see and submit the project.

Programming Project 4

Log on to Blackboard Learn to see and submit the project.

Programming Project 5

Log on to Blackboard Learn to see and submit the project.

Programming Project 6

Log on to Blackboard Learn to see and submit the project.

Test 1 Review Topics

The test will be based on material from Chapters 2, 3, 5, and 6 and in particular: Example Problems

Test 2 Review Topics

The test will focus on classes and objects (Chapters 4 and 7), and will also include previous material. In particular, the following topics from Chapters 4 and 6 will be included: Example Problems:

Final Exam Review Topics

Example Problems: See Test 1, Test 2, Quiz 4, and Quiz 5.

Example Problem 1: You deposit $2000 in a bank that provides 1.5% monthly interest rate. At the end of each month after applying the interest you withdraw $150. Write a program that prints a table showing your balance at the end of each month for 12 months. Solution: Bank.java

Example Problem 2: Write a method that takes an array of integers as a parameter and computes and prints the sum of the squares of its elements. Solution: IntArray.java

Example Problem 3: Write a class called Employee that contains three instance variables representing employee s first name (String type), last name (String type) and salary (int type), a constructor assigning values to these variables, getter and setter methods for the salary, and a toString() method that returns the employee information. Write another class containing the main method that declares an array of objects of class Employee with 10 elements. Initialize each element with an Employee object created with data entered from the keyboard by using the Scanner class and print the array. Then find the employee with the minimal salary and increase it with 10%. Print the employee information before and after the pay raise. Solution: Employee.java, Company.java