Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image

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

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

Marketing Management

Authors: Greg Marshall, Mark Johnston

2nd edition

9781259094972, 78028868, 1259094979, 978-0078028861

More Books

Students also viewed these Programming questions