public void printInformation() { System.out.println("Desktop computers are maid for mainstream use"); System.out.println("Number of free places in RAM memory: " + numberOfFreePlacesInRAMMemory); System.out.println("Is it overclocked computer: " + isOverclock); System.out.println("Does it have a CD reader: " + hasCD); super.printInformation(); }
public void printInformation() { super.printInformation(); String s = "DESKTOP: \n"; s += "Has empty memory slots? " + this.hasEmptyMemmorySlots + "\n"; s += "Is overclocked? " + this.isOverclocked + " ''\n"; s += "Has optical drive?: " + this.hasOpticalDrive + "\n"; System.out.println(s); }