1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marshall27 [118]
3 years ago
11

Design 3 classes: Computer - Superclass

Computers and Technology
1 answer:
wlad13 [49]3 years ago
5 0

Answer:

Explanation:

The following code is written in Java. It creates the three classes mentioned and a Tester class that contains the main method. The Computer class contains the memory variable since both laptops and Desktops need memory. The screen size variable is placed separately in the Laptop and Desktop class since desktops may or may not have a monitor so this variable cannot be placed in the Computer class. The batteryLife variable is only in the Laptop class because Desktops do not have batteries. Finally, the monitor variable is only placed in the Desktop class since Laptop's come with built-in monitors. The tester class seen in the picture below tests the creation of both of these objects and it executes without any error.

class Computer {

   int memory;

   public int getMemory() {

       return memory;

   }

   public void setMemory(int memory) {

       this.memory = memory;

   }

}

class Laptop extends Computer {

   int screenSize;

   double batteryLife;

   public int getScreenSize() {

       return screenSize;

   }

   public void setScreenSize(int screenSize) {

       this.screenSize = screenSize;

   }

   public double getBatteryLife() {

       return batteryLife;

   }

   public void setBatteryLife(double batteryLife) {

       this.batteryLife = batteryLife;

   }

}

class Desktop extends Computer {

   boolean monitor;

   int screenSize;

   public boolean isMonitor() {

       return monitor;

   }

   public void setMonitor(boolean monitor) {

       this.monitor = monitor;

   }

   public int getScreenSize() {

       return screenSize;

   }

   public void setScreenSize(int screenSize) {

       this.screenSize = screenSize;

   }

}

class Tester {

   public static void main(String[] args) {

       Laptop computer1 = new Laptop();

       Desktop computer2 = new Desktop();

   }

}

You might be interested in
The performance of a client-server system is strongly influenced by two major network characteristics: the bandwidth of the netw
Rama09 [41]

Answer:

A bandwidth is the maximum rate of transfer of data across a given path

Latency refers to the delay of data to travel or move between a source and destination

An example of a high bandwidth and high latency network is the Satellite Internet connectivity.

An example of a low bandwidth and latency network is the telephone system connection.

Explanation:

Solution

Bandwidth: Bandwidth determines how fast data can be transferred for example, how many bits/sec it can transport.

Latency: It refers to the delay or how long it takes for data to travel between it's source and destination.

An example of a high bandwidth and high latency network is the Satellite internet connection.

Satellite internet connection: This is responsible for the connectivity of several systems, it has a high bandwidth, since satellite are in space, due to distance it has a high latency.

So, satellite internet connection is compensated with high latency and high bandwidth.

An example of a low bandwidth and low latency network is the Telephony network.

Telephone/telephony internet connection: This connection does not have much data for transfer. it has low size audio files of which a low bandwidth range. also for both end or end users to understand and talk to each other, it has low latency.

3 0
3 years ago
What is an 8086 microprocessor used for
Liula [17]
A sixteen bit microprocessor chip used in early IBM PCs. The Intel 8088 was a version with an eight-bit externaldata bus.

The Intel 8086 was based on the design of the Intel 8080 <span>and </span>Intel 8085 (it was source compatible with the 8080)with a similar register set, but was expanded to 16 bits. The Bus Interface Unit fed the instruction stream to theExecution Unit through a 6 byte prefetch queue, so fetch and execution were concurrent - a primitive form ofpipelining (8086 instructions varied from 1 to 4 bytes).

It featured four 16-bit general registers, which could also be accessed as eight 8-bit registers, and four 16-bit indexregisters (including the stack pointer). The data registers were often used implicitly by instructions, complicatingregister allocation for temporary values. It featured 64K 8-bit I/O (or 32K 16 bit) ports and fixed vectored interrupts.There were also four segment registers that could be set from index registers.

The segment registers allowed the CPU to access 1 meg of memory in an odd way. Rather than just supplyingmissing bytes, as most segmented processors, the 8086 actually shifted the segment registers left 4 bits and addedit to the address. As a result, segments overlapped, and it was possible to have two pointers with the same valuepoint to two different memory locations, or two pointers with different values pointing to the same location. Mostpeople consider this a brain damaged design.

Although this was largely acceptable for assembly language, where control of the segments was complete (it couldeven be useful then), in higher level languages it caused constant confusion (e.g. near/far pointers). Even worse, thismade expanding the address space to more than 1 meg difficult. A later version, the Intel 80386, expanded thedesign to 32 bits, and "fixed" the segmentation, but required extra modes (suppressing the new features) forcompatibility, and retains the awkward architecture. In fact, with the right assembler, code written for the 8008 canstill be run on the most <span>recent </span>Intel 486.

The Intel 80386 added new op codes in a kludgy fashion similar to the Zilog Z80 and Zilog Z280. The Intel 486added full pipelines, and clock doubling (like <span>the </span>Zilog Z280).

So why did IBM chose the 8086 series when most of the alternatives were so much better? Apparently IBM's own engineers wanted to use the Motorola 68000, and it was used later in the forgotten IBM Instruments 9000 Laboratory Computer, but IBM already had rights to manufacture the 8086, in exchange for giving Intel the rights to its bubble memory<span> designs.</span> Apparently IBM was using 8086s in the IBM Displaywriter word processor.

Other factors were the 8-bit Intel 8088 version, which could use existing Intel 8085-type components, and allowed the computer to be based on a modified 8085 design. 68000 components were not widely available, though it could useMotorola 6800 components to an <span>extent.
</span>
Hope this helps
7 0
3 years ago
____________________ memory is the ability to add RAM without shutting down the computer or operating system.
Liula [17]

Answer:

Hot-add

Explanation:

The computer system is a electronic device that is used to perform computational task on input data for a pre-dertermined result. The components of the computer is divided into hardware and software components.

The hardware components are the physical parts of the computer system, while the software component are the instructions that runs the system.

The RAM is a physical component that provides memory for running current activities on the monitor screen. When it is removed or faulty, the screen goes blank. To add more RAM memory to the system while the system is on, activate the hot-add memory settings.

4 0
3 years ago
Please add thenodes given below to construct the AVL tree show all the necessarysteps,
Paha777 [63]

Answer:

30,33,37,18,23,34,15,38,40,17

To construct the AVL tree, follow these steps and diagrams are shown in the image:

• Add 30 to the tree as the root node. Then add 33 as the right child because of 33 is greater than 30 and AVL tree is a binary search tree.

• Then add 37 as the right child of 33. Here the balance factor of node 30 becomes 0-2 = -2, unbalanced.

Use RR rotation, make node 33 the root node, 30 as the left child of 33 and 37 as the right child of 33.

• Now add 18 as the left child of 30. And 23 as the right child of 18. Here the balance factor of 30 becomes 2-0 = 2. It’s unbalanced.

Use LR rotation, make 23 the parent of 18 and 30.  

• Now add 34 as the left child of 37 and 15 as the left child of 18. Add 38 as the right child of 37. And then add 40 as the right child of 38.

• Now adding 17 as the right child of 15 makes the tree unbalanced at 18.

Use LR rotation, make 17 as the parent of 15 and 18.

Explanation:

The balance factor of a node can be either 0,1 or -1. Else the tree is called unbalanced at the node.

If the inserted node is in the left subtree of the left subtree of the unbalance node, then perform LL rotation.

If the inserted node is in the right subtree of the right subtree of the unbalance node, then perform RR rotation.

If the inserted node is in the left subtree of the right subtree of the unbalance node, then perform RL rotation.

If the inserted node is in the right subtree of the left subtree of the unbalance node, then perform LR rotation.

7 0
2 years ago
Which site acquired by Warner Bros. in 2011 allows users to rate movies and watch movie trailers?
mel-nik [20]
It was flixter.
hope this helps
7 0
3 years ago
Read 2 more answers
Other questions:
  • PLS HELP!!
    13·1 answer
  • What are 2 ways that technology can negatively impact the environment.
    8·2 answers
  • You are given two processors P1 and P2 that execute the same instruction set but have different architectures. The instructions
    9·1 answer
  • You want to divide the value in cell D3 by the value in cell E3. Which formula should you use?
    11·2 answers
  • Describe how asymmetric encryption is used to send a message from User A to User B that assures data confidentiality, authentica
    9·1 answer
  • Why do some people argue that tech companies like Apple should do more to address the smartphone addiction problem?
    10·1 answer
  • Describe the functions of a system software​
    6·2 answers
  • Viết chương trình hoàn chỉnh các yêu cầu sau:
    8·1 answer
  • 1. Es un símbolo que indica que se ha de realizar cierta operación específica entre uno o varios
    6·1 answer
  • Check all of the file types that a Slides presentation can be downloaded as.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!