-- Program to compute the final mark in COMP1100, given the -- assignment mark and the exam mark. class MARK creation make feature assignment : INTEGER examination : INTEGER final : INTEGER make is local low_mark : INTEGER average : INTEGER do io.put_string("Enter assignment mark > ") io.read_integer; assignment := io.last_integer io.put_new_line io.put_string("Enter examination mark > ") io.read_integer; examination := io.last_integer io.put_new_line if (assignment > examination) then low_mark := examination else low_mark := assignment end average := (assignment + examination + 1) // 2 if (average > low_mark + 10) then final := low_mark + 10 else final := average end -- output io.put_string("Final mark = "); io.put_integer(final) io.put_new_line end end -- class MARK