Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objectives: Continue practicing past concepts Practice building basic C++ classes Practice using basic C++ pointers Assignment: For this lab, create a basic C++ class using

image text in transcribed

image text in transcribed

Objectives: Continue practicing past concepts Practice building basic C++ classes Practice using basic C++ pointers Assignment: For this lab, create a basic C++ class using the following UML class diagram: Quiz - Score: float - total: float + Quiz() + Quiz(float score, float total) + getScore(): float + getTotal(): total + setScore(float score): void + setTotal(float total): void For any basic tips regarding UML class diagrams, refer to the lab 4 manual hints. Then, create a main file that will have the following functions: main o Parameters: none o Return value: integer 0 o Purpose: Take in a number from the user of how many quizzes they have. Create a Quiz pointer array based on the size given. Call the build array function to get the quiz scores. Then, call the quiz average function. Display the final quiz average to the user. Deallocate your memory. buildArray O Parameters: Quiz pointer, integer array size o Return value: none Purpose: Loop for how many quiz scores the user has. For each quiz, ask their score and how many points the score had possible. Create a Quiz object to add to the Quiz pointer array Note: for each quiz score you should validate the score is not less than 0; it is not a valid quiz score until this is true getQuizAverage O Parameters: Quiz pointer, integer array size o Return value: float completed quiz average o Purpose: Loop through the quizzes, computing each individual quizzes average. Display this information to the user for each quiz. Keep tally of the quizzes averages, computing a final average at the end. Return this. Note: all quiz score averages should be displayed rounded to two decimal places at all times. Example Execution: How many quiz scores do you have: 4 what did you make on quiz 1: -1 Error. Please enter a valid (positive) quiz score. What did you make on quiz 1: -1 Error. Please enter a valid (positive) quiz score. What did you make on quiz 1: 89 How many possible points were there? 100 What did you make on quiz 2: 20 How many possible points were there? 24 What did you make on quiz 3: 18 How many possible points were there? 20 What did you make on quiz 4: 45 How many possible points were there? 50 The average of quiz 1 is: 89.00% The average of quiz 2 is: 83.33% The average of quiz 3 is: 90.00% The average of quiz 4 is: 90.00% Your quiz average was: 88.08%

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Theory And Application Bio Science And Bio Technology International Conferences DTA And BSBT 2011 Held As Part Of The Future Generation In Computer And Information Science 258

Authors: Tai-hoon Kim ,Hojjat Adeli ,Alfredo Cuzzocrea ,Tughrul Arslan ,Yanchun Zhang ,Jianhua Ma ,Kyo-il Chung ,Siti Mariyam ,Xiaofeng Song

2011th Edition

ISBN: 3642271561, 978-3642271564

More Books

Students also viewed these Databases questions

Question

7 How do I can statements help learners understand what they own?

Answered: 1 week ago

Question

explain what is meant by experiential learning

Answered: 1 week ago

Question

identify the main ways in which you learn

Answered: 1 week ago