Last active
November 5, 2015 12:18
-
-
Save golenishchev/ce7975dde04629baf9c4 to your computer and use it in GitHub Desktop.
questions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Computer { // Creating class Computer | |
int powerSupply; // fields | |
int processor; | |
int videoCard; | |
int primaryStorageRam; | |
int secondaryStorageHdd; | |
int motherBoard; | |
int water; // water coolled processor and video card | |
int turnOnThePower(int powerSupply, int motherBoard) { // methods | |
return powerSupply + motherBoard; | |
} | |
int turnOffThePower(int processor, int videoCard, int water) { | |
return processor + videoCard + water; | |
} | |
public Computer(int powerSupply, int processor, int videoCard, int primaryStorageRam, int secondaryStorageHdd, int motherBoard) { | |
this.powerSupply=powerSupply; | |
this.processor=processor; | |
this.videoCard=videoCard; | |
this.primaryStorageRam=primaryStorageRam; | |
this.secondaryStorageHdd=secondaryStorageHdd; | |
this.motherBoard=motherBoard; | |
} | |
public String toString() { | |
return powerSupply+" "+processor+" "+videoCard; | |
} | |
public static void main(String[] args) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment