Question: /* *Test 8 **/ System . out . printf(%%n~- --Test 8: retrieve the year a Student enrolled in the school (1 mark)~- ) ; System

 /* *Test 8 **/ System . out . printf("%%n~- --Test 8:

/* *Test 8 **/ System . out . printf("%%n~- --Test 8: retrieve the year a Student enrolled in the school (1 mark)~- ") ; System . out . printf("%nExpected output: Colin Allcars, student number: 223 enrolled in the year 2000") ; System. out . printf("%nActual output: %s enrolled in the year %d", st1, st1 . getNoOfYearEnrolled( ) ) ; if (st1. getNoofYearEnrolled( ) == 2000) { marks+ + ; } else { failedTest . add("Test 8") ; } System. out . printf("%nYour total marks are now: %. 0f/%. Of=%. 1f%", marks, totalMarks, marks / totalMarks * 100) ; System . out . printf("%%n! .!" ) ; System . out . printf ("%n! ~ ~ Instructor Tests - !" ); System. out . printf("%n! -!") ; /* *Test 9 **/ System . out . printf ("%n-- -Test 9: create a valid Instructor and call the tostring( ) method (1 mark) --- -") ; Instructor karenV = new Instructor ("Karen", "Vader", 1000012, "10 Hightop Lane", "Barrie", "L2S 146", LocalDate. of(2013, Month . AUGUST, 22), LocalDate . of (1962, Month . JUNE, 6) ) ; System. out . printf("%nExpected output: The Instructor is: Karen Vader") ; System. out . printf( "%nActual output: The Instructor is: %s", karenv); if (karenV. toString( ) . equalsIgnorecase( "Karen Vader") ) { marks+ + ; } else { failedTest . add("Test 9") ; }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!