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
-
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...
-
Soon after beginning the year-end audit work on March 10 for the 2017 year end at Arkin Corp., the auditor has the following conversation with the controller: Controller: The year ending March 31,...
-
A tubular shaft similar to that shown in Figure 16.11 is to be designed that has an outside diameter of 80 mm (3.15 in) and a length of 0.75 m (2.46 ft), the mechanical characteristic of prime...
-
You just learned about the use of technology in business. Consider how this content relates to other areas of business. How would you find the balance between a new hardware or software rollout and...
-
A travel and tour company has two tables relating to customers: Families and Countries. Each tour offers a discount if a minimum number of people book at the same time. Write a query (sql oracle)to...
-
Level 2 - Calculating Travel Costs at America Travels As a new sales associate at America Travels travel agency, you assist travel agents in finding the best fares for corporate customers. As a...
-
Calculate a diameter, d, to ensure that yield does not occur in the 1045 carbon steel rod below. Use a factor of safety of 5. 1045 plain carbon steel: Lo Oy = 310 MPa %3D TS = 565 MPa Oworking %3D F=...
-
The subject matter of this Agreement is the sale by the Seller of the object described below and in the documents attached as Exhibit A (the "object): Object: Vachetta leather - highest quality and...
-
At the end of the day, PayME stock will be worth 100(80% probability) or 110 (20% probability). A market-maker believes that 90% of her incoming traders are uninformed, and equally likely to buy or...
-
Problem 2: Decision Tree, post-pruning and cost complexity parameter using sklearn 0.22 [10 points, Peer Review] We will use a pre-processed natural language dataset in the CSV file "spamdata.csv" to...
-
Provide a synopsis of the landmark US Supreme Court case decided in 2018 that adversely impacted public sector unions. Explain exactly what this case means for public sector unions and what has the...
-
Estimate lim x 0+ 1 X 1 tan x
-
Design the BCD-to-seven-segment decoder which displays even numbers only & switch off all the segments when number at the input is odd. You need to perform following steps; Draw the truth table...
-
Wal-Mart is the second largest retailer in the world. The data file on the disk holds monthly data on Wal-Marts revenue, along with several possibly related economic variables. a) Using computer...
-
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...
-
On December 1, 2023, Rebecca Ward, a single taxpayer, comes to you for tax advice. At the end of every year, she donates \($5,000\) to charity. She has no other itemized deductions. This year, she...
-
Following is a list of information for Peter and Amy Jones for the current tax year. Peter and Amy are married and have three children, Aubrynne, Bryson, and Caden. They live at 100 Main Street,...
-
Kelly and Chanelle Chambers, ages 47 and 45, are married and live at 584 Thoreau Drive, Boston, MA 59483. Kellys Social Security number is 111-11-1111 and Chanelles is 222-22-2222. The Chambers have...
Study smarter with the SolutionInn App