Ask Question

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

+4
Answers (1)
  1. 17 January, 15:21
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers