CPSC/DTSC 115L: Introduction to Computer Science Fall 2026

Exam 1 review sheet

Exam 1 will be given on Friday, October 9, in class. It will be a closed-book exam, and no calculator will be allowed. The exam will cover all of the lectures given prior to the exam, reading assignments (Chapters 1–6), Laboratories 1–5, Homework 1–4 and Quizzes 1, 2.

A list of particularly important topics Practice exercises
  1. Joe's bakery pays its employees time-and-a-half for any hours worked above 40 in a given week. Design and implement a Java application that prompts the user for hours worked and an hourly wage and then computes the total wages for the week. Start from an I/O specification and algorithm.
  2. Write a Java application that prints a person's age as of March 1, 2026, given one's date of birth in the command line. In many states, March 1 in a non-leap year, such as 2026, is also the legal birthday for those who were born on February 29. If March 1 is the birthday, then it should also print a happy birthday message.
  3. Write a Java application that prints a table showing all Fahrenheit temperatures between 0 and 100 degrees, with an increment of one degree, in one column and the equivalent Celsius temperatures, with an increment of 5/9 degrees, in another column.
  4. Consider an int array named numbers. Using a single loop, write a code segment in Java that finds and prints both the minimum and maximum entries in the array. In the same loop, add a code segment that counts and prints the number of negative entries in the array.
  5. Write a code segment in Java that declares and constructs the standard 12 × 12 multiplication table in a two-dimensional int array.
  6. Write a user-defined method named maxOfTwo that takes two int values in parameters and returns the maximum of the two. Then, using the method maxOfTwo, write another user-defined method maxOfThree that takes three int values in parameters and returns the maximum of the three.
Finally, do not forget to review all the laboratory, homework and quiz problems. The laboratory, homework and quiz problems are as important as those given above.


* CPSC/DTSC 115L home page
Valid HTML 4.01!