Homework 1

Due: Sep 15, prior to 11:59:59 PM

In this homework you will

Setup

Start by replicating much of Lab 1 with the following exceptions

The Program

Your program should get two random floating point numbers between 0 and 1.0 and store them into variables. Then print the value of each of those variables and print the sum of the two variables.

Here is a complete program for printing a random number between 0 and 1.0.
public class GTrand {
    public static void main(String[] args) {
        System.out.println(Math.random());
    }
}
Recall that the name of the class and the name of the file in which the class is stored must match; so for the code above, the file name must be "GTrand.java".

Ideally the output of you program would be something like
    0.44 + 0.25 = 0.69
only with a lot more numbers after the decimal points. An output like
    0.44
    0.25
    0.69
is OK, but will loose 1 point (out of a possible 100).

Submitting

Create a readme

Use VSC to create another file in your HW1 directory. This file should be named "Readme". The contents of this file should follow this sample.

You should have 3 files in your HW1 directory: GTAdder.java, GTAdder.class and Readme. ("GTAdder" could be named something meaningful for you.)

Submit

Open a terminal and execute the following Unix commands (assuming you put HW1 directory into a CS113 directory in your home directory).
    xena@loin:~$ cd
    xena@loin:~$ cd CS113
    xena@loin:~/CS113$ /home/gtowell/bin/submit -c 113 -d HW1 -p 1
In response to the final command you should see messages like:

CS Submission System Fall 2023
Submitting Project 1 for CMSC113 with gtowell

Creating archive for submission...
HW1/
HW1/GTAdder.class
HW1/GTAdder.java
HW1/Readme

Submitting archive...
Submission complete! Submission timestamp is 2023-08-08-15-30-28-EDT.

Looking at this output, you should see every file in the directory you want to submit listed, with the final line "submission complete".

Note that for future assignments you will use this same submission technique; so do try to get this to work. If you cannot get it to work, you may -- on this assignment, send me email containing the full text of your program and Readme. If you send email, you must also make an appointment to see me so I can help you to use "submit" on future assignments.