Answer:
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();
}
}
Step-by-step explanation: