Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this question assume the following implementations of Computer, Tablet, and Notebook 6 9 1 public class Computer { 2 private String manufacturer; 3 private

image text in transcribed

image text in transcribed

image text in transcribed

For this question assume the following implementations of Computer, Tablet, and Notebook 6 9 1 public class Computer { 2 private String manufacturer; 3 private String processor; 4 private int ramSize; 5 private int diskSize; private double processorSpeed; 7 8 public Computer (String man, String pro, int rasize, int diSize, double prospe manufacturer = man; 10 processor pro; 11 ramSize = raSize; 12 diskSize = diSize; 13 processorSpeed = proSpeed; 14 } 15 16 17 18} 19 20 public static class Tablet extends Computer{ 21 private int length; 22 private int width; 23 private String operatingSystem; 24 25 public Tablet(String man, String pro, int rasize, int disize, double prospeed 26 super (man, pro, raSize, diSize, proSpeed); 27 length = len; 28 width = wid; 29 operatingSystem = os; 30 } 31 32} 33 34 35 public class Notebook extends Computer{ 36 public Notebook (String man, String pro, int raSize, int diSize, double prospe 37 super(man, pro, raSize, disize, proSpeed); 38 13 processorspeed = proSpeed; 14 } 15 16 17 18) 19 20 public static class Tablet extends Computer 21 private int length; 22 private int width; 23 private String operatingSystem; 24 25 public Tablet(String man, String pro, int rasize, int disize, double proSpeed 26 super (man, pro, raSize, diSize, proSpeed); 27 length = len; 28 width = wid; 29 operatingSystem = os; 30 } 31 32} 33 34 35 public class Notebook extends Computer{ 36 public Notebook (String man, String pro, int rasize, int disize, double prospe 37 super (man, pro, rasize, diSize, proSpeed); 38 } 39} 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. i P W NP. 1 2 public //addReturnType createArray() { 3 Computer ci new Computer("ASUS", "Intel", 8, 50, 2.4); 4 Notebook nl new Notebook ("Google", "Xeon", 20, 4, 4.5); 5 Tablet ti = new Tablet ("APPLE", "AMD", 4, 25, 2.0, 11, 8, "IOS10"); Computer c2 = new Computer("Dell", "Intel", 8, 23, 2.4); 7 8 // define array 9 // return array 10} 11 6 00 P

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 14th East European Conference Adbis 2010 Novi Sad Serbia September 2010 Proceedings Lncs 6295

Authors: Barbara Catania ,Mirjana Ivanovic ,Bernhard Thalheim

2010th Edition

3642155758, 978-3642155758

More Books

Students also viewed these Databases questions

Question

Explain Coulomb's law with an example

Answered: 1 week ago

Question

What is operating system?

Answered: 1 week ago

Question

What is Ohm's law and also tell about Snell's law?

Answered: 1 week ago