Question: questions below 1. public class Product { 2. private double price; 3. private String name; 4. private static final double SALESTAX = 7.00; 5. public

questions below  questions below 1. public class Product { 2. private double price;
3. private String name; 4. private static final double SALESTAX = 7.00;
5. public static int NumProducts = 0; 6. public Product (String name,
double price) { 7. price - price; 8. name = name; 9.

1. public class Product { 2. private double price; 3. private String name; 4. private static final double SALESTAX = 7.00; 5. public static int NumProducts = 0; 6. public Product (String name, double price) { 7. price - price; 8. name = name; 9. NumProducts++; } 10. public String getName() { 11. return name; } 12. public double getPrice() { 13. return price; } 14. public void reducePrice (double price) { 15. this.price = this.price - price; ) 16. public void increasePrice (double price) 17. this.price = this.price + price; } 18. public getPriceWithTax () { 19 return + ((SALESTAX/100) *this.price); } public class DVDMovie extends Product { private String director; private String leadingActor; private String leadingActress; public DVDMovie (String name, double price, String dir, String actor, String actress) { super(name, price); this director = dir; this.leadingActor = actor; this leadingActress = actress; ) @Override public String toString() { return "Movie Title: " + this.getName() + " Director: " + this. director + " Price: " + this.getPrice () + " Leading Actor: " + this.leadingActor " Leading Actress: + this.leadingActress; } ) 9. A. What are the methods that are inherited by the DVD Movie class from the Product class? (2 points) B. What are all the instance variables (including the inherited ones) of DVD Movie objects? (1 point) C. Are there any new methods that are added, but not inherited from other classes, to the DVDMovie class? (1 point) D. What is the name of the cosmic superclass from which the DVDMovie class inherits the toString() method? (1 point)

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!