Настя лет назад: 7
Родитель
Сommit
06102e2bb6
1 измененных файлов с 49 добавлено и 0 удалено
  1. 49 0
      src/javaapp1/Student.java

+ 49 - 0
src/javaapp1/Student.java

@@ -0,0 +1,49 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package javaapp1;
+
+/**
+ *
+ * @author Настя
+ */
+public class Student {
+    
+    public String Name;
+    public double markEnglish;
+    public double markBD;
+    public double markModelingSystems;
+    public double markPravo;
+    public double markTermeh;
+    public double markAverage;
+    
+    Student (String name, double english, double bd, double modeling, double pravo, double termeh, double avg){
+        this.Name = name;
+        this.markEnglish = english;
+        this.markBD = bd;
+        this.markModelingSystems = modeling;
+        this.markPravo = pravo;
+        this.markTermeh = termeh;
+        this.markAverage = avg;
+    }
+    
+    public double getMark(int index){
+        switch(index){
+            case 1:
+                return this.markEnglish;
+            case 2:
+                return this.markBD;
+            case 3:
+                return this.markModelingSystems;
+            case 4:
+                return this.markPravo;
+            case 5:
+                return this.markTermeh;
+            case 6:
+                return this.markAverage;
+        }
+        return 0;
+    }
+}