Homework Assignment #11 (Basic Java)

For this assignment, you will create a Java program that asks the user to input the size of a tank of gas (in gallons), the gas mileage of the car (in miles per gallon), and the cost of gas (in dollars per gallon). Then it displays how much it would cost to fill the tank and how many miles can be driven on a full tank.

When you've completed the assignment, make sure that the file containing the source code has read permissions set for everyone, and that the compiled class file has read and execute permissions set for everyone. Since this is the first time, you should also make sure that the directory the file is in has read and execute permissions set for everyone, and that all of its parent directories (including your home directory) has execute permissions set for everyone Then send an e-mail to me and Karteek (our e-mail addresses are on the syllabus) including the path and the filenames for the source code and the compiled file. So for example, if my program was named GasCalculator.java and the class I created was named GasCalculator and I had put the files in the java subdirectory of the homework directory in my home directory, then I would write ~/homework/java/GasCalculator.java and ~/homework/java/GasCalculator.class.

This assignment is due Tuesday, July 15th before class.