Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

hello, i really need help with my project without any changes in my code i just

ID: 3536275 • Letter: H

Question

hello, i really need help with my project without any changes in my code i just need someone to :

1.Design or do a general structure by a UML diagram or any other way to Describe the major steps in this program (the program contains 8 classes).

2. add programs%u2019 codes. Your code must contain a block comment

describing its purpose, descriptive comments for each of the methods, and

a few in-code comments, where appropriate.

f. Testing: Describe how to test this program along with a block comment

at the end containing sample output.

this is the code:


computer class code:

public class Computer extends ElectronicDevice{

private static int counter =0;

public Computer(String mnfctr, String model, String prcssr, double current, int voltage){

super(mnfctr, model, prcssr, current, voltage);

counter++;

} public static int getCounter(){

return counter;

}

}



Desktop class code:

public class Desktop extends PersonalComputer{

private int PCIslots;

private static int counter = 0;

  

public Desktop(String mnfctr, String model, String prcssr, double current, int voltage, double HDsize, int PCIslots){

super(mnfctr, model, prcssr, current, voltage, HDsize);

this.PCIslots = PCIslots;

counter++;

}

public static int getCounter(){

return counter;

}

public String toString(){

return "A "+ this.getClass() + " " + super.getClass() +" " + super.toString() + "and " + PCIslots + " PCI slots.";

}

}



Device class code:

public class Device{

private String mnfctr;

private String model;

private String prcssr;

private double current;

private int voltage;

private static int counter =0;

  

public Device(){}

public Device(String mnfctr, String model, String prcssr, double current, int voltage){

this.mnfctr= mnfctr;

this.model = model;

this.prcssr = prcssr;

this.current = current;

this.voltage = voltage;

counter++;

}

public String toString(){

return "manufactured by "+ mnfctr +" , model " +model +", using " +current +" amps, at " +voltage +"volts, CPU " + prcssr;

}

public int compareTo(Device device){

return this.mnfctr.compareTo(device.mnfctr);

  

}

public static int getCounter(){

return counter;

}

public String getMnfctr(){

return mnfctr;

}

}

Electronic Device class code:

public class ElectronicDevice extends Device{

private static int counter =0;

// public ElectronicDevice(){}

public ElectronicDevice(String mnfctr, String model, String prcssr, double current, int voltage){

super(mnfctr, model, prcssr, current, voltage);

counter++;

} public static int getCounter(){

return counter;

}}

Explanation / Answer

Sample output





Sorted Database Contents:

A class Notebook class Notebook manufactured by Acer , model Travelmate 2000, using 110.0 amps, at 1volts, CPU Celeron , with 40.0 MB hard disk, weighing 3.3 kg, with a 14.1 inch screen.

A class Desktop class Desktop manufactured by Acer , model Aspire RC900, using 110.0 amps, at 4volts, CPU Pentium 4 , with 40.0 MB hard disk, and 3 PCI slots.

A class Notebook class Notebook manufactured by ASUS , model Z9100N, using 110.0 amps, at 1volts, CPU Pentium M , with 80.0 MB hard disk, weighing 2.7 kg, with a 15.0 inch screen.

A class Notebook class Notebook manufactured by Compaq , model Presario R3000Z, using 110.0 amps, at 1volts, CPU AMD Athlon 64 , with 60.0 MB hard disk, weighing 3.6 kg, with a 15.4 inch screen.

A class Supercomputerclass Supercomputermanufactured by Cray , model XT3, using 400.0 amps, at 63volts, CPU AMD Opteron , with96 processors.

A class Desktop class Desktop manufactured by Compaq , model Presario SA4000T, using 110.0 amps, at 4volts, CPU Pentium 4 , with 400.0 MB hard disk, and 4 PCI slots.

A class Notebook class Notebook manufactured by Dell , model Inspiron XPS, using 110.0 amps, at 1volts, CPU Pentium 4 , with 100.0 MB hard disk, weighing 4.1 kg, with a 15.4 inch screen.

A class Desktop class Desktop manufactured by Dell , model Dimension 8400, using 110.0 amps, at 4volts, CPU Pentium 4 , with 400.0 MB hard disk, and 5 PCI slots.

A class Desktop class Desktop manufactured by HP , model Pavillion a720n, using 110.0 amps, at 4volts, CPU AMD Athlon 3200+ , with 200.0 MB hard disk, and 3 PCI slots.

A class Desktop class Desktop manufactured by HP , model Pavillion a750y, using 110.0 amps, at 4volts, CPU Pentium 4 , with 400.0 MB hard disk, and 4 PCI slots.

A class Notebook class Notebook manufactured by IBM , model Thinkpad R, using 110.0 amps, at 1volts, CPU Pentium 4 , with 30.0 MB hard disk, weighing 2.8 kg, with a 15.0 inch screen.


Object Count in Database:

11 Devices

11 Electronic Devices

11 Computers

1 Multi-User Computers

1 Supercomputers

10 Personal Computers

5 Desktop Computers

5 Notebook Computers