Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. 3.4 or less
  2. 0.3 or less
  3. 0.4 or less
  4. 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Case Studies In Business Data Bases

Authors: James Bradley

1st Edition

0030141346, 978-0030141348

More Books

Students also viewed these Databases questions

Question

13-6 How will MIS help my career?

Answered: 1 week ago

Question

13-4 What are alternative methods for building information systems?

Answered: 1 week ago