Complete the class DiscountedItem below that inherits from Item and adds an discount instance variable with a constructor, get/set, and a toString method. Uncomment the testing code in main to add discounted items to the cart.

Respuesta :

The information provided is incomplete hence the general answer. The programming instructions require the use of a Constructor, a get/set, and a toString.

What is a Constructor?

In the parlance of Java, a Constructor refers to a block of codes that look very much like the method. It is often used to internalize an object. It is normally used to create the object of a class.

What is Get/Set in Java?

The term "Get Method" is used to return the value of the variable name. It works by assigning a new name to the selected name variable.

What is ToString in Java?

The ToString () in Java returns any value given to it in a string format. If it is applied to an object, the result will return as a string object.

Learn more about Constructor (Java) at:

https://brainly.com/question/9949117