diff --git a/10689f-tp0/README.TXT b/10689f-tp0/README.TXT new file mode 100644 index 0000000..3304b14 --- /dev/null +++ b/10689f-tp0/README.TXT @@ -0,0 +1,12 @@ +------------------------------------------------------------------------ +This is the project README file. Here, you should describe your project. +Tell the reader (someone who does not know anything about this project) +all they need to know. The comments should usually include at least: +------------------------------------------------------------------------ + +PROJECT TITLE: tp0 +PURPOSE OF PROJECT: exercice +VERSION or DATE: 24/11/2023 +HOW TO START THIS PROJECT: +AUTHORS: Ali.z +USER INSTRUCTIONS: diff --git a/10689f-tp0/Student.class b/10689f-tp0/Student.class new file mode 100644 index 0000000..b7ae136 Binary files /dev/null and b/10689f-tp0/Student.class differ diff --git a/10689f-tp0/Student.ctxt b/10689f-tp0/Student.ctxt new file mode 100644 index 0000000..b311061 --- /dev/null +++ b/10689f-tp0/Student.ctxt @@ -0,0 +1,10 @@ +#BlueJ class context +comment0.target=Student +comment0.text=\r\n\ Description\ of\ class\ Student\ here.\r\n\r\n\ @author\ Ali.z\r\n\ @version\ 24/11/2023\r\n +comment1.params=name\ email\ age +comment1.target=Student(java.lang.String,\ java.lang.String,\ double) +comment1.text=\r\n\ Constructor\ for\ objects\ of\ class\ Student\r\n +comment2.params= +comment2.target=java.lang.String\ toString() +comment2.text=\r\n\ toString()\r\n\ @return\ \ \ \ string\ a\ description\ about\ student\r\n +numComments=3 diff --git a/10689f-tp0/Student.java b/10689f-tp0/Student.java new file mode 100644 index 0000000..69b8320 --- /dev/null +++ b/10689f-tp0/Student.java @@ -0,0 +1,33 @@ + +/** + * Description of class Student here. + * + * @author Ali.z + * @version 24/11/2023 + */ +public class Student +{ + // instance variables + private String name; + private String email; + private double age; + + /** + * Constructor for objects of class Student + */ + public Student(String name,String email,double age) + { + this.name = name; + this.email = email; + this.age = age; + } + + /** + * toString() + * @return string a description about student + */ + @Override + public String toString(){ + return "Student{name: "+ this.name + ", email: "+this.email+", age: "+this.age+"}"; + } +} diff --git a/10689f-tp0/main.class b/10689f-tp0/main.class new file mode 100644 index 0000000..a12d297 Binary files /dev/null and b/10689f-tp0/main.class differ diff --git a/10689f-tp0/main.ctxt b/10689f-tp0/main.ctxt new file mode 100644 index 0000000..dbf1453 --- /dev/null +++ b/10689f-tp0/main.ctxt @@ -0,0 +1,6 @@ +#BlueJ class context +comment0.target=main +comment0.text=\r\n\ Write\ a\ description\ of\ class\ main\ here.\r\n\r\n\ @author\ (your\ name)\r\n\ @version\ (a\ version\ number\ or\ a\ date)\r\n +comment1.params=args +comment1.target=void\ main(java.lang.String[]) +numComments=2 diff --git a/10689f-tp0/main.java b/10689f-tp0/main.java new file mode 100644 index 0000000..f7e0aee --- /dev/null +++ b/10689f-tp0/main.java @@ -0,0 +1,15 @@ + +/** + * Write a description of class main here. + * + * @author (your name) + * @version (a version number or a date) + */ +public class main +{ + public static void main (String [] args) { + + var std = new Student ("Ali","ali.zaarour@isae.edu.lb",25.6); + System.out.println(std); + } +} diff --git a/10689f-tp0/package.bluej b/10689f-tp0/package.bluej new file mode 100644 index 0000000..199382e --- /dev/null +++ b/10689f-tp0/package.bluej @@ -0,0 +1,39 @@ +#BlueJ package file +editor.fx.0.height=739 +editor.fx.0.width=816 +editor.fx.0.x=552 +editor.fx.0.y=98 +objectbench.height=93 +objectbench.width=760 +package.divider.horizontal=0.6 +package.divider.vertical=0.8 +package.editor.height=393 +package.editor.width=670 +package.editor.x=208 +package.editor.y=208 +package.frame.height=600 +package.frame.width=800 +package.numDependencies=0 +package.numTargets=2 +package.showExtends=true +package.showUses=true +project.charset=UTF-8 +readme.height=60 +readme.name=@README +readme.width=49 +readme.x=10 +readme.y=10 +target1.height=70 +target1.name=main +target1.showInterface=false +target1.type=ClassTarget +target1.width=120 +target1.x=260 +target1.y=80 +target2.height=70 +target2.name=Student +target2.showInterface=false +target2.type=ClassTarget +target2.width=120 +target2.x=50 +target2.y=100