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
Algorithms and the Turing machine
The main layers of a computer system, von Neumann model and four-step
instruction cycle
High-level languages, compilers and interpreters
Program-development steps
Values, types and variables
Statements and expressions
Flow of execution
Boolean expressions
Decision structures
Repetition structures
User-defined methods
Parameters and arguments
Practice exercises
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.
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.
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.
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.
Write a code segment in Java that declares and constructs the standard 12
× 12 multiplication table in a two-dimensional int array.
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.