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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 16:30, 19thomasar
How to do this programming flowchart?
Answers: 3
image
Computers and Technology, 24.06.2019 02:30, talia43
Assume a class window with accessor method getwidth that accepts no parameters and returns an integer. assume further an array of 3 window elements named winarr, has been declared and initialized. write a sequence of statements that prints out the width of the widest window in the array.
Answers: 2
image
Computers and Technology, 24.06.2019 11:20, brittanybyers122
Print "censored" if userinput contains the word "darn", else print userinput. end with newline. ex: if userinput is "that darn cat.", then output is: censoredex: if userinput is "dang, that was scary! ", then output is: dang, that was scary! note: if the submitted code has an out-of-range access, the system will stop running the code after a few seconds, and report "program end never reached." the system doesn't print the test case that caused the reported message.#include #include using namespace std; int main() {string userinput; getline(cin, userinput); int ispresent = userinput. find("darn"); if (ispresent > 0){cout < < "censored" < < endl; /* your solution goes here */return 0; }
Answers: 3
image
Computers and Technology, 24.06.2019 14:30, yeet74
Ahousehold consists of a married couple and their twin five-year old daughters. the couples children had no income and lived with their parents all of last year. how many exemptions can the couple claim on last years tax return or they file with the “ married filing jointly “ status? a. 4 b. 5 c. 3 d. 2
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 in other subjects:

Konu
Mathematics, 14.07.2020 01:01