Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Coursework Class
public class CourseWork {
CourseWork() {
// there might be some initialisations needing done
}
public void run() {
StdOut.println("DSA Coursework started\n");
doPart1();
doPart2();
doPart3();
doPart4();
doPart5();
StdOut.println("\nDSA Coursework completed");
}
private void doPart1() {
StdOut.println("Part1 started\n");
// put your test harness code for part 1 here
Game ga = new Game();
ga.display();
Television te = new Television();
te.display();
//Game me = new Game();
//me.get();
StdOut.println("\nPart1 completed");
StdOut.println("==============================================\n");
}
private void doPart2() {
StdOut.println("Part2 started\n");
// put your test harness code for part 2 here
Chooser pn = new Chooser();
pn.minmax(0, 10);
System.out.println(pn.value());
StdOut.println("\nPart2 completed");
StdOut.println("==============================================\n");
}
private void doPart3() {
StdOut.println("Part3 started\n");
ArrayList<String> answer = new ArrayList<>();
answer.add("one");
answer.add("two");
answer.add("three");
answer.add("four");
Question question = new Question(1,"MC","What is",answer);
System.out.println(question.getquestionIdentifier());
System.out.println(question.getquestionType());
System.out.println(question.gettheQuestion());
System.out.println(question.toStringanswerOptions());
//System.out.println(question.getSelectedAnswer());
StdOut.println("\nPart3 completed");
StdOut.println("==============================================\n");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment