// 22.5HV2 Software Engineering II // Unit 2 Exercise 3 import java.io.*; class student { public static int split = 50; public static int pass = 40; public student(String n){ name = n; course_work = 0; exam = 0; } public void set_marks(int e, int c) { exam = e; course_work = c; } public String get_name() { return name; } public void show_result() { int mark = (int)(split/100.0*exam + (100-split)/100.0*course_work); System.out.println(name+":"); if ( mark < pass ) { System.out.println("FAIL"); } else { System.out.println("PASS"); } } public static void set_split(int s) { student.split = s; } public static void set_pass(int p) { student.pass = p; } public static int get_split() { return (int) split; } public static int get_pass() { return (int) pass; } private String name; private int course_work, exam; };