Skip to main content

Overview

The SalesPerson class represents a salesperson in the application. It stores salesperson credentials, contact information, manager association, and manages an inventory of items assigned to the salesperson.

Constructor

Default Constructor

public SalesPerson()
Creates an empty SalesPerson instance with no initialized fields.

Parameterized Constructor

public SalesPerson(String name, String number, String password, String managerName, String Email)
Creates a SalesPerson with specified credentials and manager association.
name
String
The name of the salesperson
number
String
The phone number of the salesperson
password
String
The password for authentication
managerName
String
The name of the manager this salesperson reports to
Email
String
The email address of the salesperson

Fields

name
String
required
The name of the salesperson
number
String
required
The phone number of the salesperson
password
String
required
The password for authentication
managerName
String
required
The name of the manager this salesperson reports to
emailId
String
required
The email address of the salesperson
inventoryItems
ArrayList<InventoryItem>
required
List of inventory items assigned to this salesperson

Methods

getName()

public String getName()
Returns the name of the salesperson. Returns: String - The salesperson’s name

getNumber()

public String getNumber()
Returns the phone number of the salesperson. Returns: String - The salesperson’s phone number

getPassword()

public String getPassword()
Returns the password of the salesperson. Returns: String - The salesperson’s password

getManagerName()

public String getManagerName()
Returns the name of the manager this salesperson reports to. Returns: String - The manager’s name

getEmailId()

public String getEmailId()
Returns the email address of the salesperson. Returns: String - The salesperson’s email address

getInventoryItems()

public ArrayList<InventoryItem> getInventoryItems()
Returns the list of inventory items assigned to this salesperson. Returns: ArrayList<InventoryItem> - The list of inventory items

Source Code Location

~/workspace/source/app/src/main/java/project/avishkar/salesmanagement/SalesPerson.java

Build docs developers (and LLMs) love