Create a class student which has register number, mode type (Academic, sports, both), and average as data members. Create two friend classes Academic and Sports for student class. Input three marks for Academic and two marks for sports. Create a common non-member friend function for all the classes to calculate the average of marks based on the mode type. Create constructors for mark details. Display the Register number and average of the student. Mark must be checked for “Mark must not be zero” exception.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Create a class student which has register number, mode type (Academic, sports, both), and average as data members. Create two friend classes Academic and Sports for student class. Input three marks for Academic and two marks for sports. Create a common non-member friend function for all the classes to calculate the average of marks based on the mode type. Create constructors for mark details. Display the Register number and average of the student. Mark must be checked for “Mark must not be zero” exception.
Saitch ta he Cuestions
!!!Caution!!!
Copy/Paste is Disabled for Assessments. Do not Try to overcome by Shortcut Keys or Drag/Drop
You will Lose Data
Divisibility Test
A nunber is sid to be divisite by e nunber y when is dioded by y othe remainder is pera A number is said tobe a pume rumherfi s disbl-by 1 pnd ty Inait acly
Wiite amenu-driven program in C using a des with twD overioeded functions divide, Based an the chak e gler ty uneerary one of die
naiens muRImed. Ore an ds e cheer de dtrsesityota nunter by arotier numterant snether diin) funedon reeds to ne wcir nta s srior crpost
Funcriuns are said to be oveeloaded when cheir names are same But he unions ust ler in cher sienanure
If Chnice is t then the funutan t check tor divisibiliey gers mked
Denneninator must be checked fo "Diviible By Zero" eceprion
It nimerate =10 and denominator5 then 10k divisitie by S
sf numeratoe Ell and denominere-5 men 11 s noi divislale tys
in the msin functon aT the end of the ae, the res mu he prited as "Dlihle or taut Juls beeanthe ctave
For Cholce 2 the tuncdon tu check prime is Invoked
gPrime number
95
Scompocte number.
In the ingin runcrion the end of the caie, the result mu he rinted as Penic Numbe
Meeting now
Feor any other chaicos, the progrem mun cait
GB
Selution Alternati
Processing Involved
Output
Input
1746
OA O D A d0 ENG 12-05-2021
0O REDMI NOTE 9 PRO MAX
Type here to scarch
Transcribed Image Text:Saitch ta he Cuestions !!!Caution!!! Copy/Paste is Disabled for Assessments. Do not Try to overcome by Shortcut Keys or Drag/Drop You will Lose Data Divisibility Test A nunber is sid to be divisite by e nunber y when is dioded by y othe remainder is pera A number is said tobe a pume rumherfi s disbl-by 1 pnd ty Inait acly Wiite amenu-driven program in C using a des with twD overioeded functions divide, Based an the chak e gler ty uneerary one of die naiens muRImed. Ore an ds e cheer de dtrsesityota nunter by arotier numterant snether diin) funedon reeds to ne wcir nta s srior crpost Funcriuns are said to be oveeloaded when cheir names are same But he unions ust ler in cher sienanure If Chnice is t then the funutan t check tor divisibiliey gers mked Denneninator must be checked fo "Diviible By Zero" eceprion It nimerate =10 and denominator5 then 10k divisitie by S sf numeratoe Ell and denominere-5 men 11 s noi divislale tys in the msin functon aT the end of the ae, the res mu he prited as "Dlihle or taut Juls beeanthe ctave For Cholce 2 the tuncdon tu check prime is Invoked gPrime number 95 Scompocte number. In the ingin runcrion the end of the caie, the result mu he rinted as Penic Numbe Meeting now Feor any other chaicos, the progrem mun cait GB Selution Alternati Processing Involved Output Input 1746 OA O D A d0 ENG 12-05-2021 0O REDMI NOTE 9 PRO MAX Type here to scarch
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Data members
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education