Starting from:

$25

Java- Homework 1 (Programming) Solved

Please remember that to submit the assignment you will need to go to the Education drop down menu and select assignment complete. Once you have marked the assignment as complete you will not be able to edit it again. The assignment will close 48 hours after the deadline, since you are only allowed to use up to 48 of your late hours on any one assignment.

If you submitted your assignment accidentally and need to reopen it, post a private message on piazza, including your UNI, with the tag "codio."

Problem 1 
Write a program called F2C that allows the user to convert from degrees Fahrenheit to degrees Celsius. The program should prompt for a temperature in Fahrenheit and output a temperature in Celsius. All calculations should be done in in ints, so be careful of truncation.

Note: remember the Scanner class from lecture. Look it up in the Java api and pay special attention to the nextInt method.

Edit the file F2C.java included in the workspace.

Problem 2 
Create an application in Java that asks a user for a number of hours, days, weeks, and years. It then computes the equivalent number of minutes (ignoring leap years). Edit the file Minutes.java included in the workspace.

Problem 3 
Implement a program that directs a cashier how to give change. The program has two inputs: the amount due and the amount received form the customer.

Display the dollars, quarters, dimes, nickels, and pennies that the customer should receive in return. In order to avoid roundoff errors, the program user should supply both amounts in pennies (for example 274 instead of 2.74).

Edit the file Change.java included in the workspace.

More products