A factory manufactures electricity lamps, all of which are tested to find their lamp Lighting Level. Lamps are classified as either High Quality or Low Quality as follows: SAMPLE INPUT/OUTPUT Enter Lighting levels (negative to stop) 65 90 45 35 12 -1 Average of High Quality Lamps = 77.5 High Quality Lamps 2 Lighting Level Lamp Quality Low Quality Lamps 3 High Quality Low Quality If greater than 50 Otherwise

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 7RQ
icon
Related questions
Question
Java
A factory manufactures electricity lamps, all of which
are tested to find their lamp Lighting Level. Lamps are
classified as either High Quality or Low Quality as
follows:
SAMPLE INPUT/OUTPUT
Enter Lighting levels (negative to stop)
65 90 45 35 12 -1
Average of High Quality Lamps = 77.5
High Quality Lamps 2
Lighting Level
Lamp Quality
Low Quality Lamps = 3
If greater than 50
High Quality
Otherwise
Low Quality
Write a program that asks the user to enter the Lighting Level of several lamps until the user
enters negative lighting level to quit. The program should find and display:
(a) The average Lighting Level for High Quality lamps.
(b) The number of High Quality lamps.
(b) The number of Low Quality lamps.
Transcribed Image Text:A factory manufactures electricity lamps, all of which are tested to find their lamp Lighting Level. Lamps are classified as either High Quality or Low Quality as follows: SAMPLE INPUT/OUTPUT Enter Lighting levels (negative to stop) 65 90 45 35 12 -1 Average of High Quality Lamps = 77.5 High Quality Lamps 2 Lighting Level Lamp Quality Low Quality Lamps = 3 If greater than 50 High Quality Otherwise Low Quality Write a program that asks the user to enter the Lighting Level of several lamps until the user enters negative lighting level to quit. The program should find and display: (a) The average Lighting Level for High Quality lamps. (b) The number of High Quality lamps. (b) The number of Low Quality lamps.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Introduction to computer system
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage