In this question, we will write a complete Java program to prompt the student for a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
In this question, we will write a complete Java program to prompt the student for a sequence of courses with its grade in the format of "Course1/Grade1;Course2| Grade2; Course3 | Grade3;" as one string. Your program should separate the string into the course name and grade individually and save the course names and grades in two different arrays (2D-character array for course names and integer array for grade) and display the list of courses, average of the grades as a numerical value and letter accordingly. You can expect a perfect user who will enter the correct format. Your program should work for any numbers of course that were entered. Note: The table below depicts the numerical grades and their corresponding letter grade. Letter grade A B C D F Numerical value 288 >80 267 ≥60 <60 For example If the user's input is "COMP248| 95, ENGLISH201|75, CHEMISTRY-1| 45, ", then the info saved in the 2D-character array is: C 0 M P 2 ENGL || H E M I C the info saved in the integer array is: 95 4 S S 75 8 H 2 T R 45 0 Y ---****………………_****_ Welcome to Student Courses Grade Program! 1 your program should display "Here is the list of courses you are taking: No.1 COMP248 No.2 ENGLISH201 No.3 CHEMISTRY-1 1 The average of your courses: 71.67 and the average courses letter grade is: C You are not taking any course now! Thank you for using Student Courses Grade Program! (Note: your program should read the output data from the arrays). Hint: you can use Integer.parseInt() to convert a string to an integer number and to CharArray () to convert a string to a character array. The following are sample screen shots to illustrate the expected behavior of your program. Your program must display the same information with the same format. (assume that the data in green has been entered by the user). **************** Please enter the courses your are taking this semester (courselgrade and separated by a semicolon): 0 ****. .**** Welcome to Student Courses Grade Program! ‒‒‒‒****. .****. **** **** .****. Please enter the courses your are taking this semester (coursel grade and separated by a semicolon): MATH101 40; STAT-102|20; LANG304|85; Here is the list of courses you are taking: .****. No.1 MATH101 No.2 STAT-102 No.3 LANG304 The average of your courses: 48.33 and the average courses letter grade is: F Thank you for using Student Courses Grade Program! No.1 comp248 No.2 STAT202 No.3 COMP101 ****** Figure 2 Sample output of Question2 ****‒‒‒‒ Welcome to Student Courses Grade Program! ***‒‒‒‒‒‒‒****_ ****. Please enter the courses your are taking this semester (courselgrade and separated by a semicolon): comp248 88; STAT202 92; COMP101|96; ENGG-203|95; ****. ****.... [ Here is the list of courses you are taking: No.4 ENGG-203 The average of your courses: 92.75 and the average courses letter grade is: A Thank you for using Student Courses Grade Program! In this question, we will write a complete Java program to prompt the student for a sequence of courses with its grade in the format of "Course1/Grade1;Course2| Grade2; Course3 | Grade3;" as one string. Your program should separate the string into the course name and grade individually and save the course names and grades in two different arrays (2D-character array for course names and integer array for grade) and display the list of courses, average of the grades as a numerical value and letter accordingly. You can expect a perfect user who will enter the correct format. Your program should work for any numbers of course that were entered. Note: The table below depicts the numerical grades and their corresponding letter grade. Letter grade A B C D F Numerical value 288 >80 267 ≥60 <60 For example If the user's input is "COMP248| 95, ENGLISH201|75, CHEMISTRY-1| 45, ", then the info saved in the 2D-character array is: C 0 M P 2 ENGL || H E M I C the info saved in the integer array is: 95 4 S S 75 8 H 2 T R 45 0 Y ---****………………_****_ Welcome to Student Courses Grade Program! 1 your program should display "Here is the list of courses you are taking: No.1 COMP248 No.2 ENGLISH201 No.3 CHEMISTRY-1 1 The average of your courses: 71.67 and the average courses letter grade is: C You are not taking any course now! Thank you for using Student Courses Grade Program! (Note: your program should read the output data from the arrays). Hint: you can use Integer.parseInt() to convert a string to an integer number and to CharArray () to convert a string to a character array. The following are sample screen shots to illustrate the expected behavior of your program. Your program must display the same information with the same format. (assume that the data in green has been entered by the user). **************** Please enter the courses your are taking this semester (courselgrade and separated by a semicolon): 0 ****. .**** Welcome to Student Courses Grade Program! ‒‒‒‒****. .****. **** **** .****. Please enter the courses your are taking this semester (coursel grade and separated by a semicolon): MATH101 40; STAT-102|20; LANG304|85; Here is the list of courses you are taking: .****. No.1 MATH101 No.2 STAT-102 No.3 LANG304 The average of your courses: 48.33 and the average courses letter grade is: F Thank you for using Student Courses Grade Program! No.1 comp248 No.2 STAT202 No.3 COMP101 ****** Figure 2 Sample output of Question2 ****‒‒‒‒ Welcome to Student Courses Grade Program! ***‒‒‒‒‒‒‒****_ ****. Please enter the courses your are taking this semester (courselgrade and separated by a semicolon): comp248 88; STAT202 92; COMP101|96; ENGG-203|95; ****. ****.... [ Here is the list of courses you are taking: No.4 ENGG-203 The average of your courses: 92.75 and the average courses letter grade is: A Thank you for using Student Courses Grade Program!
Expert Answer:
Answer rating: 100% (QA)
Below is a complete Java program that accomplishes the task described java import javautilScanner pu... View the full answer
Related Book For
Computer Networking A Top-Down Approach
ISBN: 978-0136079675
5th edition
Authors: James F. Kurose, Keith W. Ross
Posted Date:
Students also viewed these programming questions
-
Consider the task of designing an automobile. Identify what you think are the major functions of an automobile and the key components that supply those functions. How might this information be used...
-
In this project, we will write a program that controls a quiz show, much like the many popular TV shows. The program will read in a group of questions and their multiple choice answers, storing them...
-
Organisations use safe work practices to ensure the health and safety of workers using essential functions and features of equipment used to clean kitchen premises and equipment. List at least three...
-
Refer to the information in Exercise 16-11. Using the direct method, prepare the statement of cash flows for the year ended June 30, 2017. IKIBAN INC. Comparatlve Balance Sheets June 30, 2017 and...
-
In Problems 1-3, plot the parametric surface over the indicated domain? 1. r(u, v) = u i + 3v j + (4 - u2 - v2)k; 0 ( u ( 2, 0 ( v ( 1. 2. r(u, v) = 2u i + 3v j + (u2 + v2)k; -1 ( u ( 1, -2 ( v ( 1....
-
International City Trust (ICT) invests in trade credits, corporate bonds, precious metal stocks, mortgage- backed securities, and construction loans. ICT has $5 million available for immediate...
-
Traditional management theory was designed to provide control and structure to which types of organizations? A. Hospitals. B. Scientific laboratories. C. Manufacturing industry. D. Institutions of...
-
Rode Inc. incurred a net operating loss of $500,000 in 2012. Combined income for 2010 and 2011 was $350,000. The tax rate for all years is 40%. Rode elects the carryback option. Prepare the journal...
-
If you buy a home with less than 20% down, you will pay an additional monthly fee, PMI (private mortgage insurance), until you reach 20% equity. Keep track of when you reach 20% equity so you can...
-
A 200.0-liter water tank can withstand pressures up to 20.0 bar absolute before rupturing. At a particular time the tank contains 165.0 kg of liquid water, the fill and exit valves are closed, and...
-
7. A 100 mg sample of polonium decays with a half-life of 3.8 days [A7]. a. Write a function for this situation in terms of its half life [1] b. How much radon will remain after i) 1 day ii) 1 week?...
-
First, use both the text and Brady v US to explain plea bargaining. What features must a guilty plea have in order to be valid? Which constitutional rights are implicated by pleading guilty? (Make...
-
Stephen is a well-known member of parliament in the (fictional) country of Costat, a contracting party to the European Convention of Human Rights. He has risen to prominence in recent years through...
-
Fox News won a court case by 'persuasively' arguing that no 'reasonable viewer' takes Tucker Carlson seriously Sonam Sheth Sep 24, 2020, 11:42 PM A federal judge on Thursday dismissed a lawsuit...
-
Suppose Carol's stock price is currently $20 and does not currently pay dividends. In the next 6 months it will either fall to $10 or rise to $40. What is the current value of a European 6-month call...
-
What is the kinetic energy of a 1 0 9. 2 cm thin uniform rod with a mass of 4 78 . 9 g that is rotating about its center at 4 . 7 3 rad / s ? Give your answer in Joules.
-
Consider E-voting software for Estonia 2004 case study and answer the questions. 1.What category is this procurement? 2.From the supplier's profile, do you think a teaming agreement is needed,...
-
a. What is meant by the term tax haven? b. What are the desired characteristics for a country if it expects to be used as a tax haven? c. What are the advantages leading an MNE to use a tax haven...
-
In Figure 4.42, suppose that there is another stub network V that is a customer of ISP A. Suppose that Band C have a peering relationship, and A is a customer of both Band C. Suppose that A would...
-
Consider the polyalphabetic system shown in Figure 8.4. Will a chosenplaintext attack that is able to get the plaintext encoding of the message "The quick brown fox jumps over the lazy dog." be...
-
Consider a packet of length L which begins at end system A and travels over three links to a destination end system. These three links are connected by two packet switches. Let dp, sp and Ri denote...
-
A dividend that is paid every quarter or every year is called? a. Regular dividend b. Special dividend c. Property dividend d. Stock dividend
-
What is the meaning of each of the following terms: corporation, articles of incorporation, corporate charter, board of directors, corporate officers, and organization costs?
-
The statement of stockholders' equity includes each of the following except: a. Retained Earning b. Treasury Stock c. Paid-in Capital in Excess of Par Value d. Accounts Receivable
Study smarter with the SolutionInn App