Imagine you are going on a trip with 2 of your best friends. You have decided to go to Tahiti. So, you need to make airfare reservations, lodging and rental car reservations for 7 days and 6 nights. After you make your reservations, you need to figure out if:
Being a computer scientist, you whip out your computer and decide to write a program to do this for you.
You have decided you want to be one of the first people to live on Mars. You have applied and been accepted. So, you pack up all your belongings and put them on the ship. However, soon after takeoff, you realize that all your measurements are going to be off because things aren’t measured in Standard English. Luckily, you have about 18 months to come up with a way to convert everything.
First, you have to convert from lbs to Mars weight. You know that if you weight 1 lb on Earth, you will weigh .38 lbs on Mars. However, to make things more difficult, you meet a new friend and they are from Canada and they measure everything thing in metric units. So, you need to create a conversion for them as well.
After living on Mars for a while, you decide to give Jupiter a try. Again, you still want to track you weight so you have to convert from your Mars weight to your Jupiter weight and your Earth weight to Jupiter weight. Remember you know that 1 lb (on Earth) equals 2.364 lbs on Jupiter. Again, your Canadian friend travels with you and so you have to convert their weight from kilograms to Jupiter’s weight too.
Finally, after living there for a while, you get tired of all the people and you move to Pluto. Again, convert your weight into Plutonian weight. You know that 1 lb(on Earth) equals .067 lb on Pluto. You decide it’s okay for your Canadian friend to tag along. So, you will need to convert their weight too.
Make sure you use good variable names and appropriate commenting. Don’t forget about using constants.
Imagine you just received your tax refund check and you want to go to the bank and cash it right away. You pull into the drive through, endorse your check and put it into the delivery tube. The nice teller comes onto the speaker and asks how you would like to receive your bills.
Because you plan on going out tonight, you say, “How about fifties first”.
So, now the teller has to figure out how many twenties to give you along with the other denominations afterward. After a while, you see the teller is struggling to put this all together, so you offer to write a quick program to figure it out for them.
So, you need to write a program that will accept any check amount and then calculate how many 50’s you should get first and then how many of the other bills and coins you should receive as well.
*** Note: If you use a really large number (i.e. over 1000, you may get inaccurate results)
For example, if your check is 174.34, then the program should print:
3 fifty dollar bills
1 twenty dollar bill
0 ten dollar bills
0 five dollar bills
4 one dollar bills
The next thought you have is, “wouldn’t your roll of cash look a lot bigger if you got it all in 5’s”.
Print out the previous breakdown again, but this time use the 5’s as the starting denomination and then the remaining change.
Remember you do not need if statements to perform this.
Write an applet that prints out 3 of your favorite music bands.
It should look something like this:
Embed a link to your applet in an HTML document and view it using a Web browser. For this problem you will need to turn in your HTML file too. (Make sure the applet class is in the same folder as your HTML file)
If you have trouble with Java Applets security settings on Windows, follow this link:
You have been asked by a local hiking club to help write a program to estimate how long it will take hikers to travel along on of their trails.
You are to take in the name of the starting point, the end point, the distance between the two trailheads, the number of stops, the average speed for the whole trip, and the cost of the trip.
After you have collected all that information, you should calculate the total time it will take to travel between the two trailheads in Days, Hours, and Minutes. Then, you should display how many miles they will travel between each stop and the cost per day.
You should display the results in the console that shows all the information on separate lines. Do not worry about formatting the numbers.
Remember to use the proper escape sequences to print the information on separate lines. (i.e. use Sytem.out.print to print information out)
Remember to use good naming conventions for your variables
Remember to use good commenting
You should not need any if/else statements to complete this problem.
|Due By (Pacific Time)||05/05/2014 12:00 am|
out of 1971 reviews
out of 766 reviews
out of 1164 reviews
out of 721 reviews
out of 1600 reviews
out of 770 reviews
out of 766 reviews
out of 680 reviews