Post date: Feb 13, 2017 6:32:25 AM
/!\ The slides are on BlackBoard (the practical page of the course)
Console Input and Output
2.1 Screen Output
2.2 Console Input Using the Scanner Class
Recommended Self-Test Exercises:
p 93: Ex. 4.
p 99: Ex. 5, 6, and 7.
p 118: Ex. 12, 13, and 15.
Recommended Programming Projects:
p 127: Ex. 3 and 4.
Lab Exercises:
Write a program that reads 2 integer numbers from the keyboard and display the the result of the addition, subtraction, multiplication, and division of the first number with the second number.
Read length and width of a rectangle from the user and display the area of the rectangle.
Write a Java program that reads a First name, Middle name and Last name and displays only the Last name and the First name on the screen.
You must use nextLine() to read the full name and then use substring() and indexOf() in order to display only the last name and the first name in that order.
Write a Java program that reads the radius of a circle and then displays the diameter, the circumference and the area of the circle.
Write a Java program that read a temperature in Celsius and convert it to Fahrenheit.
Write a Java program that reads a distance in Km and convert it to miles.
Read three strings/numbers from the user and print them in reverse order.