Another Simple Program 4

Another Simple Program 4 - Review Questions for Exam 1 This...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Review Questions for Exam 1 This review sheet is intended to give you some practice questions to use in preparing for our first midterm. It is not necessarily complete. The first exam covers the reading assignments, programming projects and class/discussion material through Friday 2/27. 1. What is a CPU? 2. Give one example of an input device and one example of an output device. 3. What is a compiler? 4. Write an algorithm that displays the sum of all numbers which are multiples of 3 between 1 and 1000. 5. Write a line of code that creates an object that may be used to read a line of text from the keyboard. 6. Using your object in #5, write a line of Java code that reads a floating point number from the keyboard. 7. Assume that val is an initialized variable of type double. Write a Java statement that prints val to the console window. Display 3 digits after the decimal point. 8. Write a complete Java program (including any necessary import statements) that reads 100 floating-point numbers from the user, and prints the max, min and average value. 9. Write a Java program that reads 20 lines of text from the user and prints the number of
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Another Simple Program 4 - Review Questions for Exam 1 This...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online