Part 3. Create two Child Classes Create two Java classes, Desktop and Laptop that both are subclasses of Computer. a) A Desktop has additional instance variables: width and height (data encapsulation...


Part 3. Create two Child Classes<br>Create two Java classes, Desktop and Laptop that both are subclasses of Computer.<br>a) A Desktop has additional instance variables: width and height (data encapsulation is expected)<br>b) A Laptop has an additional instance variable, weight (data encapsulation is expected)<br>c) Write constructors for both classes that require input for all their instance variables (including<br>Manufacturing Date, Disk size, Number of cores and Color) and no-args constructors.<br>d) Create getters and setters for all instance variables for both Child classes.<br>e) Create toString() methods in Desktop and Laptop<br>

Extracted text: Part 3. Create two Child Classes Create two Java classes, Desktop and Laptop that both are subclasses of Computer. a) A Desktop has additional instance variables: width and height (data encapsulation is expected) b) A Laptop has an additional instance variable, weight (data encapsulation is expected) c) Write constructors for both classes that require input for all their instance variables (including Manufacturing Date, Disk size, Number of cores and Color) and no-args constructors. d) Create getters and setters for all instance variables for both Child classes. e) Create toString() methods in Desktop and Laptop

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here