Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Implement a class with a main method

Implement a class with a main method

Computer Science

Implement a class with a main method. Using an enhanced for loop, display each element of this array:

[] names = {"alice", , , , , };

In a new class, implement two methods that will each calculate and return the average of an array of numeric values passed into it. Constraints:

  • one method should accept an array of ints; the other should accept an array of doubles
  • both methods must return the average to at least two decimal places of accuracy

Implement a new class demonstrating your methods in action. Call your methods at least twice each with arrays of different sizes each time.

Part 3 (50%)

The Valencia Ice Cream Shoppe pays its summer employees bonuses based on two factors: the number of weeks worked over the summer, and the number of positive customer reviews. The table below shows the bonuses based on these two factors.

Screen Shot 2020-10-17 at 7.32.32 PM.jpg

Examples:

  • Employee A worked 4 weeks and got 2 positive reviews; bonus: $325. 
  • Employee B worked 1 week and got 7 positive reviews; bonus: $180
  • Employee C worked 8 weeks and got 0 positive reviews; bonus: $425
  • Total bonuses paid: $930

Write an application that:

  • stores the bonus values in a two-dimensional array
  • allows the user to enter values for weeks worked and reviews received, and displays the amount of the bonus
  • only accepts valid values for input (focus on valid ranges; don't worry about preventing wrong type input)
  • allows the user to keep entering values until some sentinel value is entered, at which point the program ends
  • upon ending, displays the total amount of bonuses paid out based upon the values entered

Please send

all source code (.java files) & Screen Shot of output.

**Importantly please let me know what are you using to create the class and name name of class.

I am using Java eclipse.**

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE