In your textbook, this homework problem is in section 2.23 Homework 3-1.
Nestlé sells a brand of water named Ice Mountain. The water that Nestlé uses for Ice Mountain is pumped out a public underground aquifer in West Michigan. Nestlé pumps water from the aquifer at the rate of 400 Gallons per minute. Nestlé pays nothing for the water they pump, but they bottle it in 16.9 Oz bottles.
Assuming that Nestlé sells each bottle for $1.25, write a program that computes the following:
You may assume that a year has 365 days.
Your output must be of the format:
Gallons pumped per day = gallonsPerDay Gallons pumped per week = gallonsPerWeek Gallons pumped per year = gallonsPerYear Bottles produced per day = bottlesPerDay Bottles produced per week = bottlesPerWeek Bottles produced per year = bottlesPerYear Dollars made per day = dollarsMadePerDay Dollars made per week = dollarsMadePerWeek Dollars made per year = dollarsMadePerYear
Please note that your class should be named IceMountain.
In your textbook, this homework problem is in section 3.15 Homework 3-2.
Write a program that computes the fare on Copenhagen Transit given two inputs from the user:
Your prompts to the user must be:
Enter zone number : Enter adult or child :
The fare on Copenhagen Transit is specified as follows:
Your output must be of the format:
The fare for adultOrChild to zone number zoneNumber is fare.
Please note that your class should be named CopenhagenTransit.
In your textbook, this homework problem is in section 3.16 Homework 3-3.
Write a program that asks the user for their age in days. The program will compute the person's age in years and then prints one of the following messages:
For example:
If the user entered: 350, your program would output: You are an infant If the user entered: 800, your program would output: You are a toddler If the user entered, 1825, your program would output: You are a child If the user entered, 5475, your program would output: You are a teenager If the user entered, 7300, your program would output: You are a young adult If the user entered, 10950, your program would output: You are an adult If the user entered, 23725, your program would output: You are middle aged If the user entered, 25550, your program would output: You are a senior citizen
Your prompt to the user to enter the number of days must be:
Enter your age in number of days:
Please note that your class should be named AgeLabel.
Please submit the completed assignment in the corresponding section(s) in your textbook Lehman College City University of New York CMP 167 Spring 2016: Programming in Java. No other forms of submission will be accepted.