Lab Objectives: * You will practice in this lab with polymorphism. A Question Bank! In this exercise, you will implement

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Lab Objectives: * You will practice in this lab with polymorphism. A Question Bank! In this exercise, you will implement

Post by answerhappygod »

Lab Objectives You Will Practice In This Lab With Polymorphism A Question Bank In This Exercise You Will Implement 1
Lab Objectives You Will Practice In This Lab With Polymorphism A Question Bank In This Exercise You Will Implement 1 (35.13 KiB) Viewed 11 times
Lab Objectives You Will Practice In This Lab With Polymorphism A Question Bank In This Exercise You Will Implement 2
Lab Objectives You Will Practice In This Lab With Polymorphism A Question Bank In This Exercise You Will Implement 2 (23.27 KiB) Viewed 11 times
Lab Objectives: * You will practice in this lab with polymorphism. A Question Bank! In this exercise, you will implement a hierarchy of three classes that represent exam questions. Question text :string answer :string points :int default constructor parameterized constructor Setters/getters :bool is correct (string answer) ask() :void (pure virtual) (virtual) destructor TrueFalseQuestion MCQ choices size index default constructor parameterized constructor Setters/getters ask() destructor default constructor parameterized constructor ask() destructor :void Essay Question default constructor parameterized constructor ask() destructor :void :string :int int :void
a. Create an array of 10 questions. b. Ask the user to enter the number of points on each question. c. Ask the user to specify the type of question. d. Ask the user to enter the information of the question based on its type. e. Display all questions to the user and ask him to answer the questions f. Calculate the total grade. g. Define a function name compareQuestions which take two questions of any type and compare their grades to each other and print "question 1 has more credit than question 2" if the grades of the first object is greater than the number of grades in the second object, print "question 2 has more credit than question 1", otherwise print "same grade".
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply