Question: LAB 6 - CREATING AND USING ARRAYS IN JAVA (3%) The manager wants to know how much each employee is contributing to the total

LAB 6 - CREATING AND USING ARRAYS IN JAVA (3%) The manager

LAB 6 - CREATING AND USING ARRAYS IN JAVA (3%) The manager wants to know how much each employee is contributing to the total sales of the company. Create Lab6-Arrays project with classes Sales Report and Sales ReportTest. The program gets the following input: o the number of sales people the name of each salesperson his/her sales for the past month Sales Report class: Use an array to store the names and another array to store the sales for each person. Add a method to get names and sales figures for each person and then add them into respective arrays. Add a private method to calculate and return the total sales. Add a private method to calculate and return the percentage of total sales contributed by a particular employee. Add an overrided toString() method to return a string that prints all sales people with their names, percent sales formatted to one decimal and total sales. Sales ReportTester class: Ask for number of sales people. Call required methods to take and process inputs. Print % sales for each sales person. Here is the sample output: How many sales people are there? 4 Enter name [1] : Terry Bill Enter sales [1]:256.78 Enter name [2] : Steve Brandon Enter sales [2]:102 Enter name [3]: Bob Wright Enter sales [3]:300 Enter name [4] : Gurpreet Gill Enter sales [4]:212.56 Percentage of Total Sales Terry Bill 29.5 % Steve Brandon 11.7 % Bob Wright 34.4% Gurpreet Gill Total sales were $871.34 24.48

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!