Implement the Company class as depicted in the above UML diagram. The Company class contains the following attributes and methods:

Subject(s): Computer Science–Java Programming

-model: String -type: String -comp: Company -year: int -inService: boolean
+Plane(m: String, t: String, y: int, c: Company, iS: boolean) +sameCompanyName(Plane: Plane): boolean +PlaneCode(): String
+toString(): String
-name: String -country: String -shareValue: double
+Company(n: String, c: String, sV: double) +isforeign: boolean
+toString(): String
Question 1 [25 points]:
Implement the Company class as depicted in the above UML diagram. The Company class contains the following attributes and methods:
 name: could be formed of one word or more such as: Boeing, Airbus, McDonnell Douglas, etc.
 country: a String representing countries such as USA, Russia, France, Indonesia, Germany, etc.
 shareValue is an indicator of the company value in the stock market
1) A constructor that takes all attributes
2) Write only the getters and setters that you need to call in question 2 or part 2.
3) isforeign: returns true if the company’s country is not Lebanon and false otherwise.
4) toString: this method returns the description of the company as per the following format:
Company Name – country – shareValue

Get Your Custom Essay Written From Scratch
Are You Overwhelmed With Writing Assignments?
Give yourself a break and turn to our top writers. They’ll follow all the requirements to compose a premium-quality piece for you.
Order Now