Question: Translate this UML diagram into a .java file. The file should support revenue earned. Personal Trainer (-) firstName : String (-) lastName : String (-)
Translate this UML diagram into a .java file. The file should support revenue earned.

Personal Trainer (-) firstName : String (-) lastName : String (-) salary: double (-) noOfClients : int Name of the data definition class Variable that stores the first name of the Personal Trainer object Variable that stores the last name of the Personal Trainer object Variable that stores the salary of the Personal Trainer object Variable that stores the number of clients of the Personal Trainer object // Accessors (GET) Methods (+) getFirstName(): String (+) getLastName(): String (+) getSalary(): double (+) getNoOfClients():int Retrieves the first name of the Personal Trainer object Retrieves the last name of the Personal Trainer object Retrieves the salary Personal Trainer object Retrieves the number of clients Personal Trainer object //Mutators (SET) Methods (+) setFirstName( firstName : String) : void (+) setLastName( lastName : String) : void (+) setSalary( hourlySalary: double : boolean (+) setNoOfClients noOfClients : int) : boolean Sets the first name of the Personal Trainer object Sets the last name of the Personal Trainer object Sets the salary of the Personal Trainer object Sets the number of clients of the Personal Trainer object //Special Purpose Method (+) calculateRevenue) : double Calculates the revenue of the Personal Trainer object; Should be ($195 times number of Clients) minus the salary
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
