Skip to content

Instantly share code, notes, and snippets.

@djoudi
Last active March 13, 2023 13:21
Show Gist options
  • Save djoudi/baa2dd8fc47a1e6e54bc802e7c7e4b95 to your computer and use it in GitHub Desktop.
Save djoudi/baa2dd8fc47a1e6e54bc802e7c7e4b95 to your computer and use it in GitHub Desktop.
package org.example;
public class Linux {
public String kernel;
public String boot(){
return kernel;
}
}
package org.example;
public class Main {
public static void main(String[] args) {
// OS w = new OS("Windows 11",11.00,"64x");
//OS w2 = new OS();
Win w1 = new Win("Ubuntu",22.04,"x64");
// w.Start();
}
}
package org.example;
public class OS {
public String nom;
public Double version;
public String arch;
public OS(String nom,Double version,String arch){
this.nom = nom;
this.version = version;
this.arch = arch;
System.out.println("Object Created Full Fro OS");
}
/* OS(){
System.out.println("Object Created Empty");
}*/
public void Start() {
System.out.println("Starting System");
}
public void Stop() {
System.out.println("Stoping System");
}
}
package org.example;
public class Win extends OS{
public String[] programs;
// public Win(){
// super();
// }
public Win(String nom,Double version,String arch){
super(nom,version,arch);
System.out.println("this is for Win");
}
public void install(){
System.out.println("Setup Office");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment