subject

Create an application that allows a user to enter values for an array of seven Salesperson objects. Offer the user the choice of displaying the objects in order by either ID number or sales value. Save the application as SalespersonSort. java This is the code for Salesperson class:
public class Salesperson
{
private int ID;
private double annualSales;
public Salesperson(int ID, double annualSales)
{
this. ID = ID;
this. annualSales = annualSales;
}
public int getID()
{
return ID;
}
public void setID(int ID)
{
this. ID = ID;
}
public double getAnnualSales()
{
return annualSales;
}
public void setAnnualSales(double annualSales)
{
this. annualSales = annualSales;
}

public String toString()
{
return "Salesperson ID: " + ID + ", annual sales: " + annualSales;
}
}

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
Acomputer is a multipurpose device that accepts input, processes data, stores data, and produces output, all according to a series of stored . the processing unit of most modern computers is a(n) . the instructions that tell a computer how to carry out a task are referred to as computer , which are distributed as software. computers run three main types of software: software, system software, and development tools. an example of system software is a computer system, which is essentially the master controller for all the activities that a digital device performs. digital devices are constructed using tiny electronic components that represent data bits as electrical signals. the system unit houses the system board, which contains several circuits made from semiconducting materials. computers come in three popular form factors: component, , and slate. many of today's digital devices operate on battery power supplied by ion batteries. battery life and lifespan can be extended by following good battery management practices.
Answers: 3
question
Computers and Technology, 22.06.2019 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
How is the number 110 written when expanded out to place values in the base 2 (binary) number system? options: 2 x 4 + 3 x 2 + 4 x 1 1 x 2 + 1 x 2 + 0 x 2 1 x 100 + 1 x 10 + 0 x 1 1 x 4 + 1 x 2 + 0 x 1
Answers: 1
question
Computers and Technology, 22.06.2019 20:50
What is the difference between windows 7 and windows 10?
Answers: 1
You know the right answer?
Create an application that allows a user to enter values for an array of seven Salesperson objects....
Questions
question
Mathematics, 06.09.2019 23:10
Questions on the website: 13722362