Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1A Points A factory manufactures electricity lamps, all of which are tested to find their lamp Lighting Level. Lamps are classified as either High Quality

image text in transcribed
image text in transcribed
image text in transcribed
1A Points 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 Liphting levels (nepative to stop) 65 90 45 35 12 1 Lighting Level If greater than 50 Otherwise Average of High Quality Lamps=775 High Quality Lamps = 2 Low Quality Lamps3 Lamp Quality High Quality 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. he editor to format your answer Write a Java program that displays a shape representing capital letter of N as shown in the examples below. The program should ask the user to enter an integer number size greater than or equal to 4 representing the size of the letter N in terms of number of rows and columns. Appropriate error message should be displayed if the user input for size is invalid. Examples Enter size >=4 : 6 Enter size >=4 : 7 Enter size >=4 : 4 * * *** * * * * ** ** ** * ***** * * ** ** * ** * * ** * * Last utes remaining Post due. This attempt will be submitted late. Define a class with the following specifications: a. C. distance time e. Create a class called Marathon Runner that has three private data members: name (Sting), distance (double) and time (double). b. Write a constructor that accepts name, distance, and time as input parameters to initialize the private data members. Provide only one accessor (get) method and one mutator (set) method for the distance data member. d. Define a private method called calculateSpeed which calculates and returns the speed (double) of the marathon runner. The speed is calculated using the formula: speed Define a public method called isFaster() that accepts as input parameter a speed record(double). The method should return true if the current runner's speed is faster than the speed record, otherwise, return false. f. Define a public method called displayDetails() to display on the screen the runner's details as in the following sample: Runner name: Ahmed Distance traveled: 11700 m Time elapsed: 2372.0 s Runner's Speed: 4.93 m/s use the editor to formot your answer 18 minutes remaining Posrdce. This attempt will be submitted lote

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

Data Access Patterns Database Interactions In Object Oriented Applications

Authors: Clifton Nock

1st Edition

0321555627, 978-0321555625

More Books

Students also viewed these Databases questions

Question

=+Are you pregnant?

Answered: 1 week ago

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago