These values are stored in array of 7 doubles called dailyCost.

computer science

Description

Write a complete Java program to compute the cost of your annual coffee consumption. The main method calls three methods to do this: getDailyCost: requests from the user the estimated amount they spend on coffee on each day of the week, Sunday through Saturday. These values are stored in array of 7 doubles called dailyCost. The method returns this array. getAnnualCost: takes an array of doubles as a parameter (the dailyCost array) and computes the annual cost for coffee (or tea, soda, etc). Assume 52 weeks in a year. The method returns the annual cost as a double. printAnnualCost: takes a double (the annual cost) as a parameter and prints it to the command line as, for example: “Your estimated total meal plan cost is: $1500.00.”​


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.