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

Need assignment help for this question?

If you need assistance with writing your essay, we are ready to help you!

OUR PROCESS

Order

Payment

Writing

Delivery

Why Choose Us: Cost-efficiency, Plagiarism free, Money Back Guarantee, On-time Delivery, Total Сonfidentiality, 24/7 Support, 100% originality

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply