X475: OOP Create Array

For this question assume the following implementations of Computer, Tablet, and Notebook

public class Computer {
    private String manufacturer;
    private String processor;
    private int ramSize;
    private int diskSize;
    private double processorSpeed;

    public Computer(String man, String pro, int raSize, int diSize, double proSpeed) {
        manufacturer = man;
        processor = pro;
        ramSize = raSize;
        diskSize = diSize;
        processorSpeed = proSpeed;
    }


    public String getManufacturer() {
        return manufacturer;
    }


    public int getRamSize() {
        return ramSize;
    }


    public int getDiskSize() {
        return diskSize;
    }


    public double getProcessorSpeed() {
        return processorSpeed;
    }

    public boolean equals(Object obj){
      //code here is hidden  but correct
    }



}
public class Notebook extends Computer{
    public Notebook(String man, String pro, int raSize, int diSize, double proSpeed) {
        super(man, pro, raSize, diSize, proSpeed);
    }
}

For this question, the following method is supposed to return an array of the objects defined. Add the return type and create and return the array.

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.