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 (93.82 KiB) Viewed 23 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 ordinal value for Quiz is 1 Both the quiz and the exercise have the same mark. Figure 1 1/Program 2 class MyAssessment { enum Courseworks Test (30), Quiz (15), Exercise (15); public int mark; private CourseWorks (int mark) { this.mark = mark; } 9 10 } 11 12 class MyScore { 13 public static void main (String [] a) { 14 (i) 15 (ii) 16 System.out.println("Both the quiz and the exercise have the same mark."); 17 else 18 System.out.println("Both the quiz and the exercise have different marks."); 19 20} 0 (i) system.out.println("The ordinal value for " + courseWorks.Quiz + " is " + CourseWorks.Quiz.mark); 0 (ii) if (MyAssessment.Courselorks.Quiz.mark.compareTo (My Assessment.CourseWorks. Exercise.mark)) 0 (ii) if (CourseWorks. Quiz.mark == Courselorks. Exercise.mark) o i system.out.println("The ordinal value for " + My Assessment.Courseworks.Quiz + " is " + MyAssessment.CourseWorks.Quiz.mark); 0 (i) System.out.println("The ordinal value for " + My Assessment.courseworks.Quiz + " is " + MyAssessment.courseWorks.Quiz.ordinal(); (ii) if (CourseWorks. Quiz.mark.compareTo(courseworks. Exercise.mark) == 0) o (ii) if (MyAssessment.CourseWorks.Quiz.mark.compareTo (MyAssessment.courseworks. Exercise.mark) == 0) o (ii) if (MyAssessment.Courseworks.Quiz.mark == MyAssessment.CourseWorks. Exercise.mark) 0 (1) system.out.println("The ordinal value for " + courseworks.Quiz + is + CourseWorks. Quiz.ordinal(); (ii) if (CourseWorks. Quiz.mark.compareTo(CourseWorks.Exercise.mark))
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply