Complete the main method in Program 2 by filling in the blanks with an appropriate statement based on the output shown i

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Complete the main method in Program 2 by filling in the blanks with an appropriate statement based on the output shown i

Post by answerhappygod »

Complete The Main Method In Program 2 By Filling In The Blanks With An Appropriate Statement Based On The Output Shown I 1
Complete The Main Method In Program 2 By Filling In The Blanks With An Appropriate Statement Based On The Output Shown I 1 (83.24 KiB) Viewed 32 times
Complete the main method in Program 2 by filling in the blanks with an appropriate statement based on the output shown in Figure 1. The mark for Test is 30 Exercise is greater than Test Figure 1 1 1/Program 2 class MyAssessment { enum Courseworks Test (30), Quiz (15), Exercise (15); 0 0 0 0 public int mark; private Courseworks (int mark) { this.mark = mark; } } } WNE 9 10 11 12 13 14 15 16 17 18 19 20 000 class MyScore { public static void main (String[] a) { (i) (ii) System.out.println("Test is greater than Exercise"); else System.out.println("Exercise is greater than Test"); } }

(ii) if (MyAssessment.CourseWorks. Exercise.compareTo(MyAssessment.CourseWorks. Test) < 0) (ii) if (MyAssessment.CourseWorks. Test.compare To (MyAssessment.CourseWorks. Exercise) < 0) (ii) if (CourseWorks. Exercise.compareTo (CourseWorks. Test)) 0 1 (ii) if (CourseWorks. Exercise.compareTo(CourseWorks. Test) < 0) o (i) system.out.println("The mark for " + CourseWorks. Test + " is " + CourseWorks. Test.mark); 0 (ii) if (CourseWorks. Test.compareTo(CourseWorks. Exercise)) (ii) if (My Assessment.CourseWorks. Test.compareTo(MyAssessment.CourseWorks. Exercise)) (ii) if (MyAssessment.CourseWorks. Test.compareTo(My Assessment.CourseWorks.Exercise)) o (i) system.out.println("The mark for " + My Assessment.Courselorks. Test + " is " + My Assessment. Courselorks. Test.ordinal()); 0 (0) System.out.println("The mark for + My Assessment.CourseWorks. Test + " is " + My Assessment. CourseWorks. Test.mark); o(i) System.out.println("The mark for " + CourseWorks. Test + " is " + CourseWorks. Test.ordinal()); 0 (ii) if (CourseWorks. Test.compareTo(CourseWorks. Exercise) < 0)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply