Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save operateur-mar/17fd5aea193a6bd2b584217bb03b7afe to your computer and use it in GitHub Desktop.
Save operateur-mar/17fd5aea193a6bd2b584217bb03b7afe to your computer and use it in GitHub Desktop.
public class Computer {
// Set Properties - تحديد الخواص
private int id;
private String name;
private String ramModel;
private String motherBoardModel;
// Set Default Constructor - تحديد الإفتراضي :
public Computer() {}
// Set Parametrized Constructor - تحديد النوع الثاني :
public Computer(int id, String name, String ramModel, String motherBoardModel){
this.id = id;
this.name = name;
this.ramModel = ramModel;
this.motherboardModel = motherBoardModel;
}
// Set Actions - تحديد الأفعال
public void turnOn() {
System.out.Println("Computer is turned on");
}
public void turnOff(){
System.out.Println("Computer is turned off");
}
}
/*
* Created by : www.Aqweeb.com
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment