diff --git a/W2周梓浩202506050319/Student.java.txt b/W2周梓浩202506050319/Student.java.txt deleted file mode 100644 index f27c3ce..0000000 --- a/W2周梓浩202506050319/Student.java.txt +++ /dev/null @@ -1,33 +0,0 @@ -class Student{ - String studentId; - String name; - double score; - - //define a study approach - void study() { - System.out.println(studentId+" "+name+"正在学习,上一次的成绩是"+score); - } -} - - - -public class Main { - public static void main (String[] args) { - - //setting up the first object - Student s1=new Student(); - s1.studentId="001"; - s1.name="George"; - s1.score=90; - - //setting up the second object - Student s2=new Student(); - s2.studentId="002"; - s2.name="Roya"; - s2.score=95; - - //using the approach study() - s1.study(); - s2.study(); - } -}