Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Grading Criteria 100%: Program is fully correct, code is well-indented, identifiers are well-named and the output is well formatted. 90%: Program is fully correct but

image text in transcribed
image text in transcribed
image text in transcribed
Grading Criteria 100%: Program is fully correct, code is well-indented, identifiers are well-named and the output is well formatted. 90%: Program is fully correct but meaningless identifier names are used, indentation is bad, or output is not well formatted. 75%: Program runs mainly correctly. It fails to adhere to some of the specifications, 50%: Program contains syntax errors but seems correct. 0%: Program has serious syntax and/or logical errors. Lab Objectives Relationship between base class and derived class constructors and destructors Practicing on friend function. Lab Instructions Create a new folder on desktop and name it by your "ID-FirstName-LastName-Lab". Make sure to save your solutions in this folder You must upload your solutions to e-learning as follows: Each project you create it as a zip file. A text file associated with each project contains a copy of the code. Page 1 of 3 This assignment consists of three exercises. You should submit your code in seven files on the e-learning: three header file (.h) for two classes, four CPP source files (.cpp) for classes implementation and the main function. Also, in your header file, you must prevent multiple file inclusion. Your code should use separate implementation of the class. Person (-) name Type: string (-) address Type: string (-) birthYear Type: int (-) national o Type: int (+) Parameterized Constructor (+) Setters (+) Getters (*) printDetails : void KeyNoteSpeaker Participant (-) Award Type: float (-) Session Type: string (-) Topic Type: string (-) NoPubPapers Type: int (+) Parameterized Constructor (+) Parameterized Constructor (+) Getters (+) Getters (*) Setters (4) Setters NOTE 1: In all of your code, do not forget to validate all user input and to make all functions that do not modify the class constant NOTE 2: Avoid duplication of code! If something is already done in the base class, do not do it again in the derived class. Define Person Class Exercise Objectives Define class Problem Description Implement class Person. The parametrized constructor initializes the values of all data members. Function printDetails should print information about the person in a well-formatted manner. Define KeyNote Speaker Class Exercise Objectives Define class Problem Description Declare and implement KeyNote Speaker, which inherits from class Person. Note the following The award data member represents the award of the keynote speaker in dollar. The topic data member can be either "DS", "Networks" or "SWE Function getName in the base class should be overridden to return the Keynote Speaker:" + name. Function printDetails of the base class should be overridden to print the additional information about the award and topic Define Participant Class Exercise Objectives Define class Problem Description Declare and implement Participant, which inherits from class Person. Note the following: The session data member can be Data Science. Software Engineering, or Computer Networks. Function print Details of the base class should be overridden to print the additional information about the session and number of published papers. Exercise 5 - Implement a Friend Function Problem Description Write a friend function (checkNoPapers) to the Participant class to return True if the participant's number of published papers is more than or equals to 15. Otherwise, it returns False. Implement Main Write the main function as follows. Create an object of type KeyNoteSpeaker (KNS), assign the appropriate values for each data member. Create an object of type Participant (PAR), assign the appropriate values for each data member Print the details of both objects. The conference organizers wants to invite PAR to be a keynote speaker in the conference, you are asked to check the session and NoPubPapers of PAR of PAR's session is Data Science then assigns the topic to "DS". If it is Software Engineering then assigns the topic to "SWE. Otherwise, PAR's topic is "Networks IF PAR's NoPubPapers is greater than or equal to 15 then set the award to 500, otherwise, the award is 500. Declare a new KeyNote Speaker object called (newKNS) to invite PAR as a keynote speaker. Page 3 of 3

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions