Question: Q3. A. [6 pts.] Consider the following problem description. An actor supporting actor. me, year of birth, and number of movie he/she starred in. A
Q3. A. [6 pts.] Consider the following problem description. An actor supporting actor. me, year of birth, and number of movie he/she starred in. A Movie has title, starring actor and Q. Write Java classes for Actor and Movie per th UML diagram below and according to the following description: Include only attributes/methods/constructors that Actor Movie are in the UML diagram only. name: string -yob: int r the mcaiesl oujeds are the same if they star: Actor support Actor + title: String - Two movies objects are the same if they have thetarCountint +Actor(string, int) same name. - If the star of movie is reset to a new actor, the +getAge():int +Movie(other Movie) setStar(Actor) void starCount of the new actor is incremented and the toStringstring count must be decremented for the old actor. For the Actor class: - The string representation of an Actor object must be in the format: (name of actor; year of birth) ublic class Actor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
