logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

An undergraduate student completing their study is awarded a degree classified as first class, upper second, etc.

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

2 Introduction

Middlesex University (MDX) maintains a computer system for storing, converting and classify- ing student grades.

 

2.1 The Middlesex 20-point scale

MDX does not use a percentage-scale for module grades. Instead it uses a 20-point scale that starts with 1 (a first-class result) down to 20 (failure by non-participation). Conversion from percentage-based grades to the 20-point scale is required in order to enter student grades into the MDX system.

Guidelines for conversion exist in MDX’s academic regulations documents. Figure 1 (left) shows the correspondence between the two scales.

Classification of a grade on the 20-point scale into first class, upper second class and so on, is done according to Figure 1 (right).

 

 

 

 

 

Figure 2: Profile classification at MDX.

 

2.2 Honours degree classification

An undergraduate student completing their study is awarded a degree classified as first class, upper second, etc. The rules for degree classification at MDX are presented here. From now on, a grade is always in the 20-point scale.

A profile is a list of grades. A level 6 profile only contains the grades obtained in the third year of study. A level 5 profile contains the grades obtained in the second and third years. Assuming four modules per year, level 6 profiles have four grades and level 5 profiles have eight grades.1

When a student completes the study for their degree, the degree class is decided as follows.

1. Two profiles are created using the student grades: the level 5 profile and the level 6 profile.

2. Each profile is classified as first class, upper second class, lower second class or third class as indicated in Figure 2.

Specifically, if 50% of grades in the profile are first-class then the profile is first class. Otherwise, if 50% of grades are upper second or above, then the profile is upper second class. Otherwise, if 50% of grades are lower second or above, then the profile is lower second class. Otherwise, the profile is classified as third class.

3. Each profile is also marked as clear or borderline according to the bottom row of Figure 2.

Namely, if the profile is classified as first or upper second class then it is a clear profile if the third class grades in the profile are no more than 25% of the total, otherwise the profile is borderline. Lower second and third class profiles are always clear.

4. The following rules are then applied to decide which degree classification is awarded.

(a) If both profiles have the same classification then that classification is awarded.

(b) Otherwise, if the level 6 profile is better and that profile is clear, and no more than one class above the level 5 profile, then the level 6 profile classification is awarded.

(c) Otherwise, if the level 5 profile is better and that profile is clear, and no more than one class above the level 6 profile, then the level 5 profile classification is awarded.

(d) Otherwise, a procedure called discretion is applied.

1For simplicity, we assume that we only deal with full-time undergraduates on a three-year degree (with four mod- ules per year) who never repeat a year, fail a module, defer, interrupt or otherwise deviate from the standard pattern.

 

 

3 Requirements

3.1 The class Grade

The class Grade holds a grade in the MDX 20-point scale. The requirements are:

The constructor must throw IllegalArgumentException if its input is outside 1–20.

The static method fromPercentage creates a Grade object. If the input is within 0–100 then the grade returned is determined according to Figure 1 (left). If the argument is the number -1 then the grade 20 (non-participation) is returned. The method must throw an IllegalArgumentException if its argument is not within 0-100, nor -1.

The method classify returns the Classification (first, upper second, etc) of the current grade object (as stored in the points field) according to Figure 1 (right). We use a single fail classification for simplicity.

 

3.2 The class Profile

This class holds a profile. All requirements below are as explained in Section 2.2.

The constructor takes a list of grades to be inserted in the profile.   It must throw an

IllegalArgumentException if there are any fail grades, or if the list is empty or null.

The method isClear must return true if the current profile is clear, and false if the profile is borderline.

The classify method must return the classification of the current profile.

 

3.3 The class Degree

This class represents a degree to be awarded to a student.

The constructor takes two Lists of Grades for years two and three respectively. It must throw an IllegalArgumentException whenever either list given is null, does not contain four grades, or contains a fail grade.

The method classify must return the correct degree classification, as in Section 2.2.

 

 

4 Project tasks

Task 1: For each class below, design and implement (with jUnit) the following tests.

Class Grade:

TWO tests for inputs below and above the valid range for the constructor.

ONE test for a valid input, checking that getPoints returns the right value.

FIVE tests for classify, using Classifications as equivalence classes.

TWO tests for inputs below and above the valid range for fromPercentage.

TWENTY tests for fromPercentage, using each point in the 20-point scale as an equivalence class.

Class Profile:

THREE tests for the constructor, one for each distinct way input can be invalid.

SIX tests, one for each possible combination of Classification and truth value (whether the profile is clear or not) as an equivalence class.

Class Degree:

THREE tests for the constructor, one for each distinct way input can be invalid.

FIVE tests, using Classifications as equivalence classes.

Task 2: Implement the functionality required to pass the tests, with requirements as described in Section 3.

You are encouraged to write additional tests if it helps with development. These tests will not be assessed directly, but will contribute towards coverage (see next task).

Task 3: Achieve maximum branch coverage of the methods listed below. If necessary, do this by adding new tests. If it is impossible to achieve maximum coverage by adding tests, consider whether your implementation can be improved (e.g., by eliminating dead code).

Class Grade: constructor, classify, fromPercentage.

Class Profile: constructor, classify, isClear.

Class Degree: constructor, classify.

Here, coverage of a method (say, Grade.classify) will be measured by adding up the coverage reports on all tests for that method produced in tasks 1 (above) and 3 (this one).

New tests produced as part of this task should be written into a new source file per class (e.g., GradeTestCoverage.java, ProfileTestCoverage.java, etc).

 

(5/5)
Attachments:

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

947 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

721 Answers

Hire Me
expert
Husnain SaeedComputer science

662 Answers

Hire Me
expert
Atharva PatilComputer science

822 Answers

Hire Me

Get Free Quote!

373 Experts Online