COP 2250 KUP Computer Science Chao Xin Project
Description
You need to write 6 very small java programs as follows:
1) lastNameFirstNameInitialSuperPgm3 ex: robinsonMSuperPgm3
2) lastNameFirstNameInitialSubOne ex: robinsonMSubOne
3) lastNameFirstNameInitialSubTwo ex: robinsonMSubTwo
4) lastNameFirstNameInitialDriverPgm3 ex: robinsonMDriverPgm3
5) lastNameFirstNameInitialinterface ex: robinsonMinterface
6) lastNameFirstNameInitialinterfaceDriver ex: robinsonMinterfaceDriver
Questions:
*** ALL THE FOLLOWING PROGRAMS MUST BE ON THE SAME FOLDER ***
Super and Sub Classes
———————
1) Worth 2 points
*** Make sure to write the corresponding value everytime you see lastNameFirstNameInitialSuperPgm3 ***
Write a super class program called lastNameFirstNameInitialSuperPgm3 containing:
a) methodOne that accepts one int, which can not be inherited, displaying the
the int value received.
b) methodTwo that accepts two strings and displays I am super methodTwo
c) methodThree that accepts nothing and displays I am super methodThree
2) Worth 2 point
*** Make sure to write the corresponding value everytime you see lastNameFirstNameInitialSubOne ***
Write a sub-class program named lastNameFirstNameInitialSubOne
that inherets all methods from your super class in question 1 ( lastNameFirstNameInitialSuperPgm3 ),
and also display I am sub-class One.
3) Worth 2 points
*** Make sure to write the corresponding value everytime you see lastNameFirstNameInitialSuperPgm3 ***
*** Make sure to write the corresponding value everytime you see lastNameFirstNameInitialSubTwo ***
Write a sub-class program named lastNameFirstNameInitialSubTwo containing
all inheritable methods from your super class in question 1 ( lastNameFirstNameInitialSuperPgm3 )
overriding methodTwo by displaying “I am overriding methodTwo from lastNameFirstNameInitialSuperPgm3”
4) Worth 2 points
*** Make sure to write the corresponding value everytime you see lastNameFirstNameInitialDriverPgm3 ***
Write a DRIVER class (with a main method) named lastNameFirstNameInitialDriverPgm3
using all methods in all classes from questions 1, 2 and 3
Interfaces
———-
5) Worth 2 points
*** Make sure to write the corresponding value everytime you see lastNameFirstNameInitialinterface ***
Create an interface named lastNameFirstNameInitialinterface with
a) The following String global public variables:
personPanterID = “”;
personLastName = “”;
personFirstName = “”;
b) And the following method templates returning void and each method accepting one String
thePersonSchool
thePersonPantherID
thePersonLastName
thePersonFirstName
6) Worth 2 points (these are 2 extra credit points)
*** Make sure to write the corresponding value everytime you see lastNameFirstNameInitialinterfaceDriver ***
Create a program that implements the interface in question 5) and name it
lastNameFirstNameInitialinterfaceDriver
a) Make sure to initialize your global variables, example:
personPanterID = “any number”;
personLastName = “your last name”;
personFirstName = “your first name”;
b) Create a new global variable named school, containing the String FIU
c) In the thePersonSchool method display the new global variable containing FIU
d) In the thePersonPantherID method display the corresponding global variable passed in from the main method
e) In the thePersonLastName method display the corresponding global variable passed in from the main method
f) In the thePersonFirstName method display the corresponding global variable passed in from the main method
Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."