Skip to content

Instantly share code, notes, and snippets.

@golenishchev
Last active November 5, 2015 12:18
Show Gist options
  • Save golenishchev/ce7975dde04629baf9c4 to your computer and use it in GitHub Desktop.
Save golenishchev/ce7975dde04629baf9c4 to your computer and use it in GitHub Desktop.
questions
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