Ask Question
1 November, 18:28

Design and implement a set of classes that define various types of electronics equipment (computers, cell phones, pagers, digital cameras, etc.). Include data values that describe various attributes of the electronics, such as the weight, cost, power usage, and the names of the manufacturers. Include methods that are named appropriately for each class and that print an appropriate message. Create a main driver class to instantiate and exercise several of the classes github

+2
Answers (1)
  1. 1 November, 21:01
    0
    class Electronics

    {

    String Name;

    double weight;

    double cost;

    double power;

    String brand_name;

    public Electronics (String Nm, double wei, double rate, double pow, String brand)

    {

    Name=Nm;

    weight=wei;

    cost=rate;

    power=pow;

    brand_name=brand;

    }

    public void printDetails ()

    {

    System. out. println ("Item : "+Name);

    System. out. println ("Cost: $"+cost);

    System. out. println ("Power consumption : "+power+" watts per month");

    System. out. println ("weight: "+weight);

    System. out. println ("Manufacture : "+brand_name);

    }

    }

    public class ElectonicsTest

    {

    public static void main (String[] args)

    {

    //instantiating objects of class electronics

    Electronics item1=

    new Electronics ("Cell Phone",40.30,560.5,20,"Nokia");

    item1. printDetails ();

    }

    }
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “Design and implement a set of classes that define various types of electronics equipment (computers, cell phones, pagers, digital cameras, ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers