In this assignment, you will learn to read data from the keyboard and write it to the monitor. You will write a fortune telling program called Future. The program first asks the user to enter three pieces of information:
Your fortune is: When you are age years old you will look like a animal and live in city.For example, if the user entered 13 for their favorite number, fish for their favorite animal, and Paris for the city where they would like to live, then the output would be:
Your fortune is: When you are 1300 years old you will look like a fish and live in Paris.
Notice that the value printed for age is not the number entered by the user, it is that number multiplied by 100.
You will need to use the Keyboard class to make the job of reading strings and numbers from the keyboard easy. To use the Keyboard class, follow these instructions when setting up your Netbeans project:
import cs1.Keyboard;Remember that capitalization is important. There are simple examples of programs that use the Keyboard class in chapter 2 of your text.
Note that 10% of your program grade is based on the readability of your program. This includes things like proper indentation, comments, and the naming of variables and methods as described in the style guide for this class. To receive full credit for your program, make sure that you use proper indentation as demonstrated in your text and in class room examples. Also include comments at the top of each program stating your name, the course, and the purpose of the program: For example:
/* ** Name: your name here ** ** Course: CSCI 201 ** ** Purpose: purpose of program here */
The program written for this assignment must be turned in by placing it in your csci/201 directory. The program must have the name Fortune.java and it must be located in the directory csci/201/Fortune. The program will be automatically copied from this location on Feb 11th at mid-night.