Question: class Robot oop java lew PDFelement (1)Write the programming code to do the following tasks: [5 marks] . Declare two classes( based on the list

class Robot oop java
lew PDFelement (1)Write the programming code to do the following tasks: [5 marks] . Declare two classes( based on the list of classes you were given) that are described in the following UML diagrams, try to complete any missing information: Derived Class C2 extends C1 - A: int Base Class C1 X: int #Y: double + Z:char + Clint, double, char) + GetX(): int + SetX(int): void + GetY(: double + SetY(int): void + Print():void C2(....) + GetA(): int + Set A (int): void + Print(:void Is it necessary to write a constructor function in the derived class C2? If yes, write it. (Record your notes) Write a member function named Print(...), to print out on the screen the values of the data members of the class derived class (by override the inherited function Print(...) of the base class). Perform the following in the Main class: o Define an object named Objl of type C2, set the values of its data members. o Try to access (through Objl) the available inherited members in the derived class from the base class. O Print out on the screen the values of the data members of the object Objl
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
