Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

System . out . printf( %%n%n -Test 33: Test to ensure invalid Instructor will not be added: (1 mark)-- --) ; System . out .

image text in transcribed
System . out . printf( "%%n%n -Test 33: Test to ensure invalid Instructor will not be added: (1 mark)-- --") ; System . out . printf("%Expected output : java. lang. IllegalArgumentException: Professor Frank Enstein is not qualified to teach COMP9999" ) ; System . out . printf("%nActual output : " ) ; try { Course comp9999 = new Course (frank, "COMP9999", "Swift 101", "B230", DayOfweek. THURSDAY, LocalTime . parse( "13:00"), 20) ; failedTest . add( "Test 33") ; } catch (IllegalArgumentException e) { System . out . print (e) ; marks+ +; System. out . printf("%nYour total marks are now: %. of/%. of=%.1f%%", marks, totalMarks, marks / totalMarks * 100) ; System. out . printf("%%n! -!") ; System. out . printf ("%n!~ ~ Course With lab Tests - - !" ) ; System . out . printf("%n! -!" ) ; /* *Test 34 **/ System. out . printf("%%n-- -Test 34: Test creating a valid lab course: (2 marks)- -") ; Instructor labGuy = new Instructor ( "Dan", "Gerus", 1000013, "15 Risk Ave. ", "Barrie", "L3S 146", LocalDate. of (2011, Month . AUGUST, 22), LocalDate . of (1982, Month . JUNE, 6) ); labGuy . addCourseToInstructorAbilities("COMP2004-LAB" ) ; karenV . addCourseToInstructorAbilities("COMP2004" ) ; CourseWithLab comp2004 = new CourseWithLab (karenV, "COMP2004", "FX GUIS", "E208", DayOfWeek. MONDAY, LocalTime . parse("08:00"), 3, labGuy, "E204", DayOfWeek. WEDNESDAY, LocalTime . parse( "15:00") ) ; System. out . printf( "%nExpected output: COMP2004-FX GUIs with lab") ; System . out . printf ("%nActual output : %s" comp2004 . toString( ) ) ; if ( comp2904. tostri als ("COMP2904- GUTs with lab"))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions

Question

Describe the relationship between relevance and accuracy.

Answered: 1 week ago