Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed
/* *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

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

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions

Question

Explain the steps in

Answered: 1 week ago

Question

Java interpreter is also known as ?

Answered: 1 week ago

Question

Which purpose a construction is used?

Answered: 1 week ago

Question

The trim method of the string class removes..........?

Answered: 1 week ago

Question

Which type of data is not accessed in a derived class?

Answered: 1 week ago

Question

India experiences which type of climate?

Answered: 1 week ago