Complete the main method in Program 2 by filling in the blanks with an appropriate statement...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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 //Program 2 class MyAssessment { enum CourseWorks { Test (30), Quiz (15), Exercise (15); 9 10 11 12 class MyScore { 13. 14 15 16 17 18 19 20 } } public int mark; private CourseWorks (int mark) ( this.mark = mark; } public static void main (String [] a) { (i) (ii) } System.out.println ("Both the quiz and the exercise have the same mark."); System.out.println("Both the quiz and the exercise have different marks."); else (i) System.out.println("The ordinal value for " + CourseWorks.Quiz + " is " + CourseWorks.Quiz.mark); (ii) if (MyAssessment. Courseworks.Quiz.mark.compareTo (My Assessment. CourseWorks. Exercise.mark)) (ii) if (Courseworks.Quiz.mark == CourseWorks.Exercise.mark) □ (i) System.out.println("The ordinal value for " + MyAssessment. CourseWorks.Quiz + " is " + MyAssessment.CourseWorks.Quiz.mark); □ (i) System.out.println("The ordinal value for " + MyAssessment. CourseWorks.Quiz + " is " + MyAssessment. CourseWorks.Quiz.ordinal()); (ii) if (Courseworks.Quiz.mark.compareTo(Courseworks.Exercise.mark) == 0) O (ii) if (My Assessment. Courseworks.Quiz.mark.compare To (MyAssessment. CourseWorks. Exercise.mark) == 0) O (ii) if (MyAssessment. CourseWorks. Quiz.mark == MyAssessment. CourseWorks. Exercise.mark) □ (i) System.out.println("The ordinal value for " + Courseworks.Quiz + " is " + Courseworks.Quiz.ordinal()); (ii) if (Courseworks.Quiz.mark.compareTo (CourseWorks.Exercise.mark)) 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 //Program 2 class MyAssessment { enum CourseWorks { Test (30), Quiz (15), Exercise (15); 9 10 11 12 class MyScore { 13. 14 15 16 17 18 19 20 } } public int mark; private CourseWorks (int mark) ( this.mark = mark; } public static void main (String [] a) { (i) (ii) } System.out.println ("Both the quiz and the exercise have the same mark."); System.out.println("Both the quiz and the exercise have different marks."); else (i) System.out.println("The ordinal value for " + CourseWorks.Quiz + " is " + CourseWorks.Quiz.mark); (ii) if (MyAssessment. Courseworks.Quiz.mark.compareTo (My Assessment. CourseWorks. Exercise.mark)) (ii) if (Courseworks.Quiz.mark == CourseWorks.Exercise.mark) □ (i) System.out.println("The ordinal value for " + MyAssessment. CourseWorks.Quiz + " is " + MyAssessment.CourseWorks.Quiz.mark); □ (i) System.out.println("The ordinal value for " + MyAssessment. CourseWorks.Quiz + " is " + MyAssessment. CourseWorks.Quiz.ordinal()); (ii) if (Courseworks.Quiz.mark.compareTo(Courseworks.Exercise.mark) == 0) O (ii) if (My Assessment. Courseworks.Quiz.mark.compare To (MyAssessment. CourseWorks. Exercise.mark) == 0) O (ii) if (MyAssessment. CourseWorks. Quiz.mark == MyAssessment. CourseWorks. Exercise.mark) □ (i) System.out.println("The ordinal value for " + Courseworks.Quiz + " is " + Courseworks.Quiz.ordinal()); (ii) if (Courseworks.Quiz.mark.compareTo (CourseWorks.Exercise.mark))
Expert Answer:
Answer rating: 100% (QA)
The correct completion for the main method in Program 2 based on the output shown in Figure 1 is i S... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Carol Harris, Ph.D, CPA, is a single taxpayer and she lives at 674 Yankee Street, Durham, NC 27409. Her Social Security number is 793-52-4335. Carol is an Associate Professor of Accounting at a local...
-
A researcher wanted to find out if there was difference between older movie goers and younger movie goers with respect to their estimates of a successful actors income. The researcher first...
-
1. Farmer Annie's Ice Cream Shop has calculated the marginal product of labor, and the results are shown in the following table. The wage for workers is $70 per day, and the pints of ice cream sell...
-
Select one CIKR and identify the private and public partnership structure. What Sector-Specific Agency would be responsible for providing institutional knowledge / and specialized expertise for your...
-
The following data represent the total compensation for 10 randomly selected chief executive ofcers (CEO) and the companys stock performance in 2009. Based on the analysis from Problem 31 in Section...
-
In a pretest, 30 respondents were asked to express their preference for an outdoor lifestyle (V1) using a 7 -point scale $(1=$ not at all preferred, 7 = greatly preferred $)$. They were also asked to...
-
Suppose the S&P 500 index is 1100 and that it is possible to lend at 4 % and borrow at 7 %. The index pays continuously compounded dividend yield of 2%. a) Suppose you observe a 6-month price of...
-
Question 2: Consider filtrations Gn Fn, n = 0,1,. If {Mn)n0 is adapted to {Gn}nzo and is a martingale with respect to {F}n0, is it also a martingale with respect to {Gn}nzo?
-
Berkshire Controllers usually finances its engineering projects with a combination of debt and equity capital. The resulting MARR ranges from a low of 4% per year, if business is slow, to a high of...
-
Patriot Co. manufactures and sells three products: red, white, and blue. Their unit selling prices are red, $20; white, $35; and blue, $65. The per unit variable costs to manufacture and sell these...
-
For an investment horizon from 1926 to 2021, which of the following investments had the highest return: the S&P 500, small stocks, world portfolio, corporate bonds, or Treasury bills? Which had the...
-
NoGrowth Corporation currently pays a dividend of $1.36 per year, and it will continue to pay this dividend forever. What is the price per share if its equity cost of capital is 15% per year?
-
We have 96 years of data on the S&P 500 returns, yet we cannot estimate the expected return of the S&P 500 very accurately. Why?
-
Suppose Pepsicos stock has a beta of 0.72. If the risk-free rate is 2% and the expected return of the market portfolio is 6%, what is Pepsicos equity cost of capital?
-
How can you use a securitys beta to estimate its cost of capital?
-
Luc Laroche has decided to hire an external consultant to investigate the problem. Do you think that this is a wise decision or would it have been better to ask his son Davy or an internal consultant...
-
A spacecraft has left the earth and is moving toward Mars. An observer on the earth finds that, relative to measurements made when the spacecraft was at rest, its a. length is shorter b. KE is less...
-
Jan has two jobs during 2012. One employer withheld and paid FICA taxes on $66,600 of Jan's salary, and the other employer withheld and paid FICA taxes on $44,400 in salary paid to Jan. Calculate the...
-
Marty is a sales consultant. Marty incurs the following expenses related to entertainment of his clients in 2012: Dues to a country club......................................................$4,500...
-
Olive Corporation was formed and began operations on January 1, 2012. The corporation's income statement for the year and the balance sheet at year-end are presented below. The corporation made...
-
Explain how the financial manager might use industry norms in the design of the companys financing mix.
-
You have developed the following income statement for Sing-Tel Corporation. It represents the most recent years operations, which ended yesterday. Your supervisor in the controllers office has just...
-
Financial data for three corporations are displayed here. MEASURE FIRM FIRM FIRM INDUSTRY A B C NORM Debt ratio 21% 24% 39% 21% Times interest 7.5 10.2 7.0 9.1 times earned times times times...
Study smarter with the SolutionInn App