(Solved) : Take Look Class Diagram Criteria Ve Posted Please Let Know Missing Setters Mutators Every Q42769991 . . .

Take a look at my class diagram and then the criteria I’veposted below. Please let me know if I am missing anysetters/mutators. and if everything else is correct. For 6e – I’mnot supposed to overload a setQuarterlySales(int []) assetQuarterlySales(int, int, int, int) – the design of this methodreinforces the need to make deep copies of array parameters. Howwould I do that?

+ Employee +firstName : String +last Name: String +idNum: int <<interface>> + Comparable +compareTo(test: Employee) +Employee

Create a database of employees given the following:

1. Each Employee has the following attributes:

a. First name

b. Last name

c. Id number

2. Each Employee has the following methods:

a.Constructors (default, overloaded to accept first and lastnames and the id number, copy)

b. getFullName() — the attributes are stored as first andlast, the method returns first and last combined (how will you dothat?)

c. getLastName() – self explanatory

d. Commission earned (this method will be abstract) – commissionis earned differently for the two subclasses below.

3. In addition to the attributes of Employee, a Manager has thefollowing attributes:

a.Regions that they are responsible for – this is an array of 3integers, representing 3 different regions by number

4. Each Manager has the following methods:

a.getTotalAmountOfSales () – this method returns the amount of $sold in their regions

b. getCommission() – the manager’s is commission based on amountsold in their regions Compute commission as 1% of total sales intheir own regions

5. In addition to the attributes of Employee, a SalesPerson hasthe following attributes:a.Their region number – an integer

b. The amount of quarterly sales in their own region. This is aninteger array of 4 values,

6. Each SalesPerson has the following methods:

a.getTotalSales() — returns the sum of all 4 quarters.

b. getHighestQuarter() — returns the name of the quarter withthe most sales. For example, if your program determines that theamount in the 2nd quarter is highest, this method returns 2ndquarter has highest, NOT the value

c. getCommissionPerQuarter(int quarter) — returns thecommission for a specified quarter – see the chart to determine thepercentage earned for sales amount – use a Utilities method fordetermining this percentage.

d. getCommissionForYear() — returns the total amount ofcommission earned for the year.— I recommend calling thegetCommissionPerQuarter() method 4 times and adding those valuestogether.

e. setQuarterlySales(int []) – this method sets the quarterlysales amounts that are read from the sales data file.

f.compareTo(SalesPerson) — returns negative if the callingobject made less in commission than the parameter object, positiveif the calling object made less in commission than the parameterobject and returns 0 if they made the same (implement theComparable interface on the SalesPersonclass)

+ Employee +firstName : String +last Name: String +idNum: int <<interface>> + Comparable +compareTo(test: Employee) +Employee +Employee(firstName : String, lastName : String, idNum : int) +Employee(copy: Employee) +getFullName : String +getLastName(): String + commissionEarnedo : double +equals(test : Employee) : boolean +toStringo : String + Manager +regions : ArrayList<Manager + Salesperson +regionNum: int +quaterly Sales: ArrayList<SalesPerson> +Managero +Manager(regions: ArrayList<Manager>) +Manager(copy : Manager) +get Tota AmountOfSaleso: double +getCommission: double +get Regionso: ArrayList Manager +84 0perati0n0 : int +equals(test : Manager): boolean +toStringo : String +SalesPersono +SalesPerson(regionNum: int quarterly Sales : ArrayList<Salesperson >>> +SalesPerson(copy: Salesperson) +get TotalSaleso: int +get HighestQuartero : String +get CommissionPerQuartero: int +get CommissionForYearo: int + setQuarterly Sales(into): int +Ev0peration : int +equals(test : SalesPerson): boolean Show transcribed image text + Employee +firstName : String +last Name: String +idNum: int + Comparable +compareTo(test: Employee) +Employee +Employee(firstName : String, lastName : String, idNum : int) +Employee(copy: Employee) +getFullName : String +getLastName(): String + commissionEarnedo : double +equals(test : Employee) : boolean +toStringo : String + Manager +regions : ArrayList> +SalesPerson(copy: Salesperson) +get TotalSaleso: int +get HighestQuartero : String +get CommissionPerQuartero: int +get CommissionForYearo: int + setQuarterly Sales(into): int +Ev0peration : int +equals(test : SalesPerson): boolean

Expert Answer


Answer to Take a look at my class diagram and then the criteria I’ve posted below. Please let me know if I am missing any setters/…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us