kimmy

kimmy

Lv1

AstroColegio de Dagupan

0 Followers
0 Following
0 Helped

ANSWERS

Published12

Subjects

Marketing1Science4Probability2Computer Science1Accounting2Biology1Chemistry1

JAVA Coding Needed

6-Your program MUST be very modular

7-Your output MUST friendly (using labels for all info accordingly) and do display all input and calculated fields.

8-You must implement JOptionPane for all your input and output and must validate all input for all prompts.

 

Problem’s specifications:

 The GPMS (Green Pollution Monitoring Service ) a fictitious orgaism is tasking you with the coding of an application that monitors the pollution levels of different sites in the USA.

All data are to be stored in an array of 100 object of type ‘Site’

Code a class ‘Site’ with the following attributes and methods:

-the ID of a given site.

-The name of a given site

-the pollution numeric value: adopt data and attributes from the following site

-Index value (see below under option 2 in the menu)

 

What to do?

-In the main class, declarae an array of 100 object of type ‘Site’

-In the main class, code the following menu in a separate function:

MENU

---------

-1-Add a site

-2-Display a site

-3-Quit

-If user select 1 from the MENU, constract an object site, and call a method in the class ‘Site’ that input data for a given site.

-If user select 2 from the MENU, call a function that search for a site in the array of objects of type ‘Site’  by ID and if found call a function that determines the index value (1 for good, 2 for moderate, 3 for unhealthy for sensitive groups, 4 for unhealthy, 5 for very unhealthy, 6 for hazardous)  based on the pollution numerical value as represented in the given site.

-Call a function member of the class Site, that displays a report about this site (ID, Name, Pollution Value, Index Statement based on the index numerical value)

-Code a function/routine that after the user complete the input of all available sites, displays the site info. that is the most polluted. Also, display how many sites were input for this study.

What to submit?

Submit your complete .Java code named HW3_lastname.java

Extra credits:

-Use ArrayList instead of array of objects

Answer: ...

Show transcribed image text
Answer: ...
Answer: ....
Answer: ...
Answer: ...
Answer: ...
Answer: ...
Answer: ...
Answer: ...
Answer: ...
STAR IN A BOX-STUDYING H-R DIAGRAM
* Open the lid. The main plot is a Hertzsprung-Russell diagram. On the right, the information panel allows comparisons between the radius, surface temperature, luminosity, and mass of the star relative to the Sun. The starting parameters are for a star like the Sun.
PART 1.
Click the play button below the Hertzsprung-Russell diagram to show the Sun's evolution. Once it is complete, you can click on "Data Table" (upper right) to see a range of parameters.
1. Describe how the Sun changes over its lifetime.
2. When will the Sun be at its brightest?
3. When will the Sun be at its hottest?
4. In which stage of its life does the Sun spend the longest time?
5. In which stage of life will the Sun undergo the most change?
6. What kind of star will the Sun be at the end of its life?
7. How long will the Sun live for?
 
PART 2:
By adjusting the mass of the star in the "Star Properties" you can explore the evolution of different stars.
1. Where do the different mass stars lie on the main sequence>
2. List the different final stages of a star's life.
 
PART 3:
 Follow the evolution for five stars with different masses. Complete the table below filling in a row for each mass.
 
PART 4:
Compare the data table for a range of stars.
1. Are more massive stars the brightest and hottest types of star for their whole lives?
2. Which mass star gets the hottest?
3. Which mass star gets the coolest?
4. Which mass star becomes the most luminous?
 
PART 5:
Deneb and Betelgeuse are both 20x the mass of the Sun, but look very different. Deneb has 100 times the radius of the Sun and its temperature is about 8000K. Betelgeuse has 1000 times the radius of the Sun and its temperature is about 3500K.
1. What stages of their lives are the two stars in?
2. How long does each star have to live?
Answer: ...
Answer: ....

Weekly leaderboard

Start filling in the gaps now
Log in