Page 511 - Introduction to Programming with Java: A Problem Solving Approach
P. 511
Figure 12.5
Manager class for Dealership program
Apago PDF Enhancer
12.2 Composition and Aggregation 477
/***********************************************************
*
Manager.java
Dean & Dean
This class implements a car dealership sales manager.
***********************************************************/
*
*
*
public class Manager
{
}
// end Manager class
private String name;
//********************************************************
public Manager(String name)
{
}
this.name = name;
//********************************************************
public String getName()
{
}
return name;
/*************************************************
*
SalesPerson.java
Dean & Dean
This class implements a car sales person.
*************************************************/
*
*
*
public class SalesPerson
{
}
// end SalesPerson class
private String name;
private double sales = 0.0; // sales to date
//**********************************************
public SalesPerson(String name)
{
}
this.name = name;
//**********************************************
public String getName()
{
}
return name;
Figure 12.6
SalesPerson class for Dealership program