COP 3804 Intermediate Java - COP3804pgm3c_4 Professor: Michael Robinson e-mail : michael.robinson@cs.fiu.edu - At the beginning of EVERY program add the following: /********************************************************************* Author : Your Name Course : COP 2250, COP 3804, etc Professor : Michael Robinson Program : Name ( example: lastNameFirstNameInitialSuperPgm3 ) Program Purpose/Description { A brief description of the program } Due Date : MM/DD/YYYY Certification: I hereby certify that this work is my own and none of it is the work of any other person. ..........{ your signature }.......... *********************************************************************/ ***************************************************************** * Worth 10 points PLUS 2 extra credit points = 12 total points * ***************************************************************** ********************************************************** * ONLY the tools taught in this class will be accepted * ********************************************************** *************************************************** * Use System.out.printf ONLY to do all printing * *************************************************** *********************************************************************************** * No IDEs can be used. All programs MUST be done in TERMINAL MODE using editors * *********************************************************************************** *********************************************************************************** * Make sure the program is properly documented and aligned uniformally, * * according to our "JAVA Programming Rules", discussed in class and located at: * * http://users.cis.fiu.edu/~mrobi002/includes/JAVA_programmingRules * * * * I will take points off if you do not follow the programming instructions. * *********************************************************************************** Purpose of this program: ======================== a) Super Classes Chapter 13 Inheritance and Polymorphism, begins at page 327 in our book b) Sub Classes c) Interfaces Chapter 14 Interfaces and Abstraction, begins at page 379 in our book 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 ) overloading methodTwo by displaying "I am overloading 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 Program submission: - ZIP folder containing the source code for all six programs above, from questions 1, 2, 3, 4, 5, and 6 - Upload your zipped folder to your Canvas account NOTE: If you have any question, please email me at michael.robinson@cs.fiu.edu We have face 2 face and online FREE tutoring from Monday thru Saturday, please visit us, NO APPOINTMENTS NECESSARY. Please attend my Office Hours twice a week Please remember that we are here to help you succeed in your classes