Question: Create an ItemSold class for Francis Pet Supply. Fields include an invoice number, description, and price. Create get and set methods for each field. Create
Create an ItemSold class for Francis Pet Supply. Fields include an invoice number, description, and price. Create get and set methods for each field. Create a subclass named PetSold that descends from ItemSold and includes three Boolean fields that indicate whether the pet has been vaccinated, neutered, and housebroken, and include get and set methods for these fields. Write an application that creates two objects of each class, and demonstrate that all the methods work correctly. Save the files as ItemSold.java, PetSold.java, and DemoItemsAndPets.java.
Step by Step Solution
3.33 Rating (162 Votes )
There are 3 Steps involved in it
DemoItemsAndPets import javautil public class DemoItemsAndPets public static void mainString args ItemSold item1 new ItemSold ItemSold item2 new ItemS... View full answer
Get step-by-step solutions from verified subject matter experts
