I am trying to do a basic SalesPerson class. We suppose that a salesperson has a name (modelled by a String), a basic (monthly) pay (a double), and a sales target (a double, representing the sums of the prices of all the items she/he should aim to sell during a month). Using BlueJ, create a assignment1 project, and within this write a SalesPerson class which contains (i) declarations of name, basicPay and salesTarget instance fields; (ii) a constructor which initialises these instance fields (using its three parameter values); and (iii) getName, getBasicPay and getSalesTarget methods which return the values of the three instance fields. This is what im trying to do please could some write the class, or just get me started .thanks
/** SalesPerson.java
* @author Charles Bell
* @version Nov 25, 2002
* SalesPerson class which contains
* (i) declarations of name, basicPay and salesTarget instance fields;
* (ii) a constructor which initialises these instance fields (using its
* three parameter values); and
* (iii) getName, getBasicPay and getSalesTarget methods which return
* the values of the three instance fields.
*/
publicclass SalesPerson{
/* declarations of name, basicPay and salesTarget instance fields */
private String name = "";
privatedouble basicPay;
privatedouble salesTarget;
/* Constructor which initialises these instance fields
* (using its three parameter values)
*/
public SalesPerson(String name, double basicPay, double salesTarget){
this.name = name;
this.basicPay = basicPay;
this.salesTarget = salesTarget;
}
/* getName() method which returns the value of the name instance field.
*/
public String getName(){
return name;
}
/* getBasicPay() method which returns the value of the basicPay instance field.
*/
publicdouble getBasicPay(){
return basicPay;
}
/* getSalesTarget() method which returns the value of the salesTarget instance field.
*/
publicdouble getSalesTarget(){
return salesTarget;
}
publicvoid setName(String name){
this.name = name;
}
publicvoid setBasicPay(double basicPay){
this.basicPay = basicPay;
}
publicvoid setSalesTarget(double salesTarget){
this.salesTarget = salesTarget;
}
}