Question: I have provided the starting java code: Exercise 11-5 Work with an abstract class In this exercise, you'll create an abstract class that contains an

 I have provided the starting java code: Exercise 11-5 Work with

I have provided the starting java code:

an abstract class In this exercise, you'll create an abstract class thatcontains an abstract method, and you'll modify other classes so they implementthis abstract class. Review the application 1. Open the project named chll_ex5_ProductListerthat's in the extra ex_starts directory 2. Open the classes and reviewtheir code. 3. Run the application to make sure it works correctlyCreate an abstract class and inherit it 4. In the murach.db package,

Exercise 11-5 Work with an abstract class In this exercise, you'll create an abstract class that contains an abstract method, and you'll modify other classes so they implement this abstract class. Review the application 1. Open the project named chll_ex5_ProductLister that's in the extra ex_starts directory 2. Open the classes and review their code. 3. Run the application to make sure it works correctly Create an abstract class and inherit it 4. In the murach.db package, add an abstract class named AbstractProductDB that contains the following abstract method public abstract Product get (String productCode) In the ProductDB class, modify the code so that this class inherits the 5. AbstractProductDB class 6. Attempt to compile the application. This should display an error message that indicates that the ProductDB classms override the abstract get method. 7. In the ProductDB class, modify the code so it overrides the abstract get method 8. In the Main class, modify the code so it calls the get method, not the getProduct method 9. In the Main class, modify the code so it creates an instance of the AbstractProductDB class like this AbstractProductDB dbnew ProductDB) This shows that the ProductDB class implements the abstract get method specified by the AbstractProductDB class 10. Run the application to make sure it works correctly Modify another class so it inherits the abstract class 11. In the ProductDB2 class, modify the code so it inherits the AbstractProductDB class and implements its abstract get method 12. In the Main class, modify the code so it uses ProductDB2, not ProductDB. This should be easy since both classes implement the abstract get method. 13. Run the application to make sure it works correctly

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!