Question: abstract class code if someone could write this code, it'd be a big help:) us.com/extra/ThirdPartyProviders/FLVS/32959 AP_CompSci_v9_ CA/module15/rtfmod15/15,01 Assignment In I A: Listen a ccccc Assessment
abstract class code


if someone could write this code, it'd be a big help:)
us.com/extra/ThirdPartyProviders/FLVS/32959 AP_CompSci_v9_ CA/module15/rtfmod15/15,01 Assignment In I A: Listen a ccccc Assessment Instructions Instructions: For this assessment, you are going to created an abstract class and then extend it. 1. 2. Create a folder called Assessment in your Unit S assessments folder. Create an abstract class called Homework. Homework will need an instance variable pagesRead and methods to get and set the number of pages to Read. pagesRead should be of type int. Homework will also need an instance variable typeHomework and a method to get and set the type of Homework. typeHomework should be of String type. a. b. 1. C. Homework will also need an abstract method createAssignment(), which has parameters int p. Its return type should be void. C. You will not have to add any other additional instance variables or methods, but you will have to set up the constructor to provide pagesRead with default value of 0 and typeHomework with default value of "none." It should take no arguments. 2. d. Save the class as Homework.java. 3. You are to create a class called MyMath that extends class Homework. a. MyMath's constructor will just call Homework's constructor and again have no arguments. using parameter p, and then set the type of Homework to "Math." to be read for Homework b. MyMath should implement the createAssignment method by setting the pages read c. Include a toString() method that lists the type of Homework and the pages that have d. Save the class as MyMath.java. a. MyScience's constructor will just call Homework's constructor and again have no b. MyScience should implement the createAssignment method by setting the pages read 4. You are to create a class called MyScience that extends class Homework. arguments. using parameter p, and then set the type of Homework to 3. "Science." c Indlude a tostringl method that its the type of Homework and the pages that have to be read for Homework. d. Save the class as MyScience.java. 5. You are to create a class called MyEnglish that extends class Homework. a. MyEnglish's constructor will just call Homework's constructor and again have no
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
