Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Consider a class, GreatBuyStaff, which represents the staff of a particular Great Buy store (i.e., a group of sales people). The sales people are

1. Consider a class, GreatBuyStaff, which represents the staff of a particular Great Buy store (i.e., a group of sales people). The sales people are stored as SalesPerson objects in an array called salespeople.
public class GreatBuyStaff
{
private SalesPerson[] salesPeople;
// constructors and other data fields not shown
// returns salesperson with greatest number of sales
public SalesPerson getBestSeller ()
{
// to be implemented
} }
The following is one of the public methods of the SalesPerson class:
// returns number of sales made by salesperson
public int numSales()
The getBestSeller method returns the salesperson in salesPeople who has made the greatest number of sales.
A. Implement getBestSeller.
public SalesPerson getBestSeller ()
B. The percentOver100 method returns the percentage of salespeople in salesPeople who have made at least 100 sales. Implement percentOver100.
public double percentOver100 ()

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

Fundamentals Of Database System

Authors: Elmasri Ramez And Navathe Shamkant

7th Edition

978-9332582705

More Books

Students also viewed these Databases questions