CUNY Queens College**We aren't endorsed by this school
Course
CSCI 212
Subject
Computer Science
Date
Dec 17, 2024
Pages
1
Uploaded by SargentGrasshopperMaster1164
public class Microwave extends Appliance {private int watts;// Constructor for Microwavepublic Microwave(double price, int watts, String serialNumber) {super(price, serialNumber); // Call parent constructor to set price and serial numberthis.watts = watts; // Set watts specifically for Microwave}//toString to return formatted details for the Microwave appliancepublic String toString() {return "Appliance Type: " + getType() + ", Serial Number: " + getSerial()+", Price: $" + getPrice() + ", Watts: " + watts;}}