Menu

You need to write 6 very small java programs as follows: 1) lastNameFirstNameInitialSuperPgm3         ex:smithMSuperPgm3 2) lastNameFirstNameInitialSubOne               ex: smithMSubOne 3…

Question

Answered step-by-step

You need to write 6 very small java programs as follows: 1)…

You need to write 6 very small java programs as follows:
1) lastNameFirstNameInitialSuperPgm3         ex:smithMSuperPgm3
2) lastNameFirstNameInitialSubOne               ex: smithMSubOne
3) lastNameFirstNameInitialSubTwo                ex:smithMSubTwo
4) lastNameFirstNameInitialDriverPgm3         ex: smithMDriverPgm3
5) lastNameFirstNameInitialinterface              ex: smithMinterface
6) lastNameFirstNameInitialinterfaceDriver   ex: smithMinterfaceDriver

Questions:

*** ALL THE FOLLOWING PROGRAMS MUST BE IN THE SAME FOLDER ***

***Use System.out.printf ONLY to do all printing  ***

*** The Main method must be  last in the program**

 

 

Super and Sub Classes
———————
1) 
   *** 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) 
   *** 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) 
   *** 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) 
   *** 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) 
   *** 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) 
   *** 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

 

OR

Leave a Reply

Your email address will not be published. Required fields are marked *