Ask Question
18 January, 22:53

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

+1
Answers (1)
  1. 19 January, 02:31
    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?
Get 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 & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers