Question
Write a program in Java which computes the level of pollution for different gases. The program displays a menu and receive data from a user.
Write a program in Java which computes the level of pollution for different gases. The program displays a menu and receive data from a user. The pollution level is checked for newer and older cars.
Menu:
1.Carbon monoxide
2.Hydro Carbons
3. nitrogen oxides
4.Non methane hydro carbons
Inputs will be pollutant number in grams released per miles and the odometer reading
Output : passed or failed and display why it failed.
For cars lower than 50,000 miles
The accepted levels are:
- 3.4 or less
- 0.3 or less
- 0.4 or less
- 0.25 or less
For cars with 50,000 or more:
1* 4.2 or less
2 * 0.39 or less
3* 0.4 or less
4* 0.31 or less
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started