Comp101 Lab4Due: 11:59 pm Tues March 4th. Wednesday March 5th.
In this lab you will continue your java programming experience writing
a very simple program from scratch.
- Write your own program from scratch in Java
- Write your own main method.
- Read input from the user.
Details:Make sure you do all of your work for this lab in its own folder.
and then move into that folder to do all of your work.
are going to write a very simple command line calculator. Since we
don't have too many programming contructs yet, you will write a
calculator that only does addition. Your program must
it. Its pretty simple really, but this is the first one where I've not
told you what every single method should looke like. There is one
additional requirement, when you write your main method, it cannot be
more than 2 lines long. Therefore you'll have to do your actual work in
one or more methods in the class that you write. You furthermore cannot
have any static methods in your class other than the main method. (So
you will have to create an object to do the work)
- prompt the user to enter a first number and then read in that first number from the user.
- prompt the user to enter a second number and then read in that second number from the user.
- Add the two numbers and then print the result to the screen.
Since you are
writing your own methods, you'll need to comment your methods in this
lab. Some portion of the grade for the lab will be reserved for
When you submit this time, add a readme.txt file to your Lab3 folder
that you are building. (In xemacs you create a new file by doing
<file><open file> and typing in a brand new file name. The
readme should contain:
Once you have the readme done, cd into your parent folder, zip up the
entire Lab4 folder using the -r flag as you have learned in the earlier
labs, and use the online submission program to submit it to me.
- Your name.
- A very brief summary of what you did
- A list of any problems still in your code or anything that you didn't get done.