Interface Computer


public interface Computer

Write a description of interface Computer here.

Version:
(a version number or a date)
Author:
(your name)

Method Summary
 void addComponent(Component component)
          Adds new component to the computer.
 int getRequiredPower()
          Gets the total required power of all components
 

Method Detail

addComponent

void addComponent(Component component)
                  throws java.lang.IllegalArgumentException
Adds new component to the computer.

Parameters:
component - component to be added to the computer
Throws:
java.lang.IllegalArgumentException - if the total power consuption of all included components exceeds 95% of the power source capacity.

getRequiredPower

int getRequiredPower()
Gets the total required power of all components