Purpose of this program: === Master the creation and implementation of: 1. Polymorphism begins at page 342 in our book 2
Posted: Fri Jul 01, 2022 5:35 am
QUESTIONS: 1a) Create a Super Class named lastNameFirstNameInitialSuperPgm4 containing: Worth 0.50 points (sub-total points 0.50). I) method1 that accepts one int and can not be inherited displaying the int value received. Worth 0.50 points (sub-total points 1.00 ). II) method2 that accepts two strings and displays them, and also displays I am super method2. Worth 0.50 points (sub-total points 1.50 ). III) method3 that accepts nothing and displays I am super method3 | robinsonMSuperPgm4 super-class | method1 method2 method3 1b) Worth 1.50 points (sub-total points 3.00 ). Create three sub classes named sub1, sub2, and sub3 which are sub classes of the Super Class in question la, and are also Super Classes themselves, which can be inherited, each worth 0.50 points. I sub1 | sub2 I sub3 I | Super1 | Super2 | Supper3 | 1c) Worth 0.50 points (sub-total points 3.5). Create a sub class named lastNameFirstInitialTheBuilder, which is a sub class of sub2/Super2 class and displays all methods of the lastNameFirstNameInitialSuperPgm4 super class ONLY plus the words: I am TheBuilder | robinsonMTheBuilder | I sub-class 1d) Worth 0.50 points (sub-total points 4). Write a sub-class program called lastNameFirstInitialOverloader containing all inheritable methods from your super class in question 1 (lastNameFirstNameInitial SuperPgm4 ), connecting to sub2 in question 1b), overloading method2 by displaying "Hell I am the Overloader" | robinsonMOverloader sub-class I le) Worth 2 points (sub-total points 6). Create a driver class (with a main method) named lastNameFirstNameInitialTheDriverPgm4 (example robinsonMThe DriverPgm4) using all methods in all classes from questions 1a, 1b, 1c and 1d. robinsonMTheDriverPgm4 driver-class
2) Worth 2 points (sub-total points 8). Swap in Chapter 12 begins, at page 301 in our book. Using the swap program we learned in class, display the following numbers 784, 5, 123, 56 places them in order from the lowest to the highest and display the results. 3) Worth 2 points (sub-total points 10). Sorting in Chapter 12 begins, at page 303 in our book. Create a single dimension array with you first and last name. Using a bubble sort display the contents of the above array in alphabetical order. 4) Worth 2 points (sub-total points 12 ) Recursion in Chapter 12, begins at page 319 in our book. Create a recursion program to find the factorial of 10. In each loading step display "Calling step X" In each returning step display their curresponding values such as: Dec 4! = 4*3! = 4*6 Total 24