Adam is a student at the School of Fine Art. To help pay his tuition, he...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Adam is a student at the School of Fine Art. To help pay his tuition, he took a job in the school's student records department. The work is to develop program that calculates each student's grade point average (GPA). He thought it would be simple, because he knows that the formula is: total grade points divided by total credit hours attempted. The formula to calculate GPA is as follows: GPA = totalGP / creditHours Attempted The GPA means the grades are converting on a numerical scale and the traditional range of GPA is '0.0' to '4.0'. You may assume the program would be provided with the total grades and the attempted credit hours. The final output needs to display the Grade from the calculated GPA as shown in the figure. n Grade GPA A 4 B 3 D 1 F 0 2 But due to the study load, he could not accomplish the task. Now, you are appointed in the program development process to help Adam in the process. You are asked to write snippets (small pieces of reusable code) based on the questions that Adam might consolidate and use in the final program. There are 9 questions based on the case study. Answer all the given questions based on the given case study. Make necessary assumptions if required. Question 1 5 marks Adam's meeting with the school's administrators is part of which stage of the application development life cycle? Also, mention and briefly describe other stages of application development life cycle. Question 2 Write the code to define the following variables with appropriate datatypes Student name, Student id, GPA, Total GPA Attempted Credit Hours 5 marks Question 3 5 marks Write the code to take input from the user and store it in the assigned variables as in question 2. Also write the code to calculate GPA based on the input variables. Question 4 5 marks Write the appropriate snippet to calculate the grade (A, B, C, D and F) based on the calculated GPA. You may use appropriate block statement to write the logic. Question 5 5 marks Rewrite a parameterized method CalculateGrade(....) that returns GPA for each student when provided with totalGP and credithours Attempted. Discuss pass by value and reference in context to the method CalculateGrade(....) that you have written. Question 6 5 marks Adam's program crashes with new students who have not attempted any credit hours, instead of just giving them a GPA of 0.0. Write the corrected code that takes care of student with no credit hours. Define exception handling in C# in context to the given scenario. Question 7 5 marks Rewrite the code to get input from the user for each student's name, totalGP and credit Hours Attempted as arrays with 10 elements. Also write code to print the array elements on the screen. Question 8 5 marks Adam has developed other methods in the class, but he does not want those methods to be called by any derived classes. What access modifier should he use for those methods? Define other access modifiers that he can use in different scenarios with respect to the given program. Question 9 10 marks The school expects to implement concept of Object-oriented programming concepts (OOPs) a. Write the snippet to define a class 'Student' with required attributes/states and methods/behavior to calculate the grade. b. Write the constructor to initialize the attributes student name, GPA and credithoursAttempted. c. Create an instance/object of class 'Student' passed with student name, GPA and credit hours. d. Show how one can implement polymorphism and encapsulation in the given program. Adam is a student at the School of Fine Art. To help pay his tuition, he took a job in the school's student records department. The work is to develop program that calculates each student's grade point average (GPA). He thought it would be simple, because he knows that the formula is: total grade points divided by total credit hours attempted. The formula to calculate GPA is as follows: GPA = totalGP / creditHours Attempted The GPA means the grades are converting on a numerical scale and the traditional range of GPA is '0.0' to '4.0'. You may assume the program would be provided with the total grades and the attempted credit hours. The final output needs to display the Grade from the calculated GPA as shown in the figure. n Grade GPA A 4 B 3 D 1 F 0 2 But due to the study load, he could not accomplish the task. Now, you are appointed in the program development process to help Adam in the process. You are asked to write snippets (small pieces of reusable code) based on the questions that Adam might consolidate and use in the final program. There are 9 questions based on the case study. Answer all the given questions based on the given case study. Make necessary assumptions if required. Question 1 5 marks Adam's meeting with the school's administrators is part of which stage of the application development life cycle? Also, mention and briefly describe other stages of application development life cycle. Question 2 Write the code to define the following variables with appropriate datatypes Student name, Student id, GPA, Total GPA Attempted Credit Hours 5 marks Question 3 5 marks Write the code to take input from the user and store it in the assigned variables as in question 2. Also write the code to calculate GPA based on the input variables. Question 4 5 marks Write the appropriate snippet to calculate the grade (A, B, C, D and F) based on the calculated GPA. You may use appropriate block statement to write the logic. Question 5 5 marks Rewrite a parameterized method CalculateGrade(....) that returns GPA for each student when provided with totalGP and credithours Attempted. Discuss pass by value and reference in context to the method CalculateGrade(....) that you have written. Question 6 5 marks Adam's program crashes with new students who have not attempted any credit hours, instead of just giving them a GPA of 0.0. Write the corrected code that takes care of student with no credit hours. Define exception handling in C# in context to the given scenario. Question 7 5 marks Rewrite the code to get input from the user for each student's name, totalGP and credit Hours Attempted as arrays with 10 elements. Also write code to print the array elements on the screen. Question 8 5 marks Adam has developed other methods in the class, but he does not want those methods to be called by any derived classes. What access modifier should he use for those methods? Define other access modifiers that he can use in different scenarios with respect to the given program. Question 9 10 marks The school expects to implement concept of Object-oriented programming concepts (OOPs) a. Write the snippet to define a class 'Student' with required attributes/states and methods/behavior to calculate the grade. b. Write the constructor to initialize the attributes student name, GPA and credithoursAttempted. c. Create an instance/object of class 'Student' passed with student name, GPA and credit hours. d. Show how one can implement polymorphism and encapsulation in the given program.
Expert Answer:
Answer rating: 100% (QA)
Question 1 Meeting with schools administration is part of Requirement gathering and analysisor Planning and analysis stage In this stage all the information that is relevant to application to be devel... View the full answer
Related Book For
Canadian Income Taxation Planning And Decision Making
ISBN: 9781259094330
17th Edition 2014-2015 Version
Authors: Joan Kitunen, William Buckwold
Posted Date:
Students also viewed these programming questions
-
What is the most important thing that you learned in the Automobile Travel? Do coaches and buses contribute to the development of tourism? In what way? Why or why not?
-
Write an explanation for the correct answers SCENARIO: Lionel is a student at the School of Fine Art. To help pay his tuition, he took a job in the schools student records department. He developed a...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Several factors can impact the structural soundness of 3D-printed objects, including the struts that connect various pieces. The following data appears in the article Analyzing the Effects of...
-
We will find later (with separation of variables) that the solution for Newton's law of cooling with initial condition H(0) is H(t) = A + [H(0) - A]e-t. For each set of given parameter values, a....
-
The U.S. Department of Energy estimates that 570,000 barrels of oil would be saved per day if every household in the United States lowered the thermostat setting in winter by 6 F (3.3C). Assuming the...
-
Discuss the key features of Section 302 of the Sarbanes-Oxley Act.
-
Suppose that five years ago Cisco Systems sold a 15-year bond issue that had a $1,000 par value and a 7 percent coupon rate. Interest is paid semiannually. a. If the going interest rate has risen to...
-
4. (10 points) Answer the following questions: (a) Consider a two-state Markov chain. Suppose that in a game of poke Talking: win a hand, the probability of winning the next hand is . However, if you...
-
The spool has a mass of 30 kg and a radius of gyration k o = 0.25 m. Block A has a mass of 25 kg, and block B has a mass of 10 kg. If they are released from rest, determine the time required for...
-
Suppose that unexpectedly the Bank of Norway increases the interest rate by 50bp. The FED keeps the target interest rate stable. What will happen to the spot and forward exchange rates? Discuss.
-
One method that is designed to deter an EDP equipment operator from manipulating computer records is: a. To keep the operator out of the machine room. b. To prevent operators from having access to...
-
When to use the official form complaints?
-
What format to use for stating a cause of action?
-
The method that may be used to reconstruct files after minor processing errors or record destruction includes: a. Relying on the judgment of welltrained operators. b. Reference to computer registers...
-
How to identify parties in the complaint?
-
For each of the unrelated situations described below, prepare the entries required to record the transactions. (Credit account titles are automatically indented when the amount is entered. Do not...
-
Chicago Company sold merchandise to a customer for $1,500 cash in a state with a 6% sales tax rate. The total amount of cash collected from the customer was $558. $600. $642. $636. Nevada Company...
-
What types of property, if any, are not eligible for the elective option when they are transferred to a corporation?
-
On April 1st of the current year, Carl purchased 60% of the shares of P Ltd. from an unrelated person. Details of the inventory and other assets owned by P Ltd. at that time are summarized below....
-
Ruth Delaney owns all of the common shares of Delaney Fast Food Services Ltd. In addition, she has several investments that generate reasonable annual cash returns, as follows: Income Corporate bonds...
-
How can a buyer be protected against any hidden liabilities and debts that the target may have?
-
What is the purpose of representations and warranties? What are the limits of such clauses?
-
What is the logical result of a successful hostile buy-up of shares on the market?
Study smarter with the SolutionInn App