The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
Elementary,Middle School,High School,College,University,PHD
| Teaching Since: | May 2017 |
| Last Sign in: | 406 Weeks Ago, 1 Day Ago |
| Questions Answered: | 66690 |
| Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Using Java Language
Design a modular program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should then display the total monthly cost of these expenses, and the total annual cost of these expenses.
The professor asked me to get this module to work on DrJava but im confused with how to do that. This is the module I got.
Module main()
Call monthlyCost()
End Module
Declare Integer loan , insuranceAmt
Display "Enter the monthly cost of payment"
Input loan
Display "Enter the monthly cost of insurance"
Input insurance
Display "Enter the monthly cost of gas"
Input gas
Display "Enter the monthly cost of oil"
Input oil
Display "Enter the monthly cost of tires"
Input tires
Display "Enter the monthly cost of maintenace"
Input maintenance
Set monExpense = loan+insurance+gas+oil+tires+maintenace
Set annualExpense = monExpense*12
Display "Total Monthly cost of Automobile:"
Display monExpense
Display "Total Annual cost of Automobile:"
Display annualExpense
End Module
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll