Step Defne a class named Course with te following member veriaties • code: Couse code ja strirg ke CMPTI an) • wetian secton number lan inger) • capacity mawiun unter of statents lan integer • namotuderts carent namber uf stutents jar integer) • I An amay tat stores the infa for he stadents in e eaurse, a poister to a Mudent abject delined n part 1 Merer tunetion inelude: • 4accesar funeton (lor the tirst feur ember variablos) • 2 mutator function ( fer cote and section) • Del consctar that sets: tode-CMPTZ100, sectior, capacity-15, nundtuderis-0 and aloutes reessary mamary for liut (35 studern • A caratuer that accepts cede, secion enher, and apecity. It set numstudentsard alloce recary memory for list (aacity utental • Adestructar to free the altocated memory • Alclen named add which addi a stutent • A functon naed ealay (ta dispiay all stedenti, this function hes oirput Mgument

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
Step 2-Define a class namod Course with tie following member variaties
• code: Course code ja strirg kke CMPT2 300)
• sectian Section nurber Jan integer)
nnumber of stadents lan integer
• capacity maxinum
. Damstudents curent namber of stafents tan integer)
• Ist: An anray tat stores the infa for the students in the course, as a pointer to a Student
ab ect jdelined in part 1
Verber funtion include
• 4accessor function (lo the tirst four member veriables)
• 2 mutatar functions ( for cote and section
• Defaus constuctor that sets: tode-CMPT2300, sectioni, capacity-35, numstudenis-0 and
elosates necessary mamonc fer list (35 studerrsi
• A cpratrucer that accepts cede, aection her, ard capacity. It set pumstucents:0 and
allocete recesary memory for list (capacity stutental
. Adestructar to free the allocated memory
• Aluncion named add which adds a stucent
• A funcion named esalav ita display all stutents, thisfunction hes so irout arpument
Transcribed Image Text:Step 2-Define a class namod Course with tie following member variaties • code: Course code ja strirg kke CMPT2 300) • sectian Section nurber Jan integer) nnumber of stadents lan integer • capacity maxinum . Damstudents curent namber of stafents tan integer) • Ist: An anray tat stores the infa for the students in the course, as a pointer to a Student ab ect jdelined in part 1 Verber funtion include • 4accessor function (lo the tirst four member veriables) • 2 mutatar functions ( for cote and section • Defaus constuctor that sets: tode-CMPT2300, sectioni, capacity-35, numstudenis-0 and elosates necessary mamonc fer list (35 studerrsi • A cpratrucer that accepts cede, aection her, ard capacity. It set pumstucents:0 and allocete recesary memory for list (capacity stutental . Adestructar to free the allocated memory • Aluncion named add which adds a stucent • A funcion named esalav ita display all stutents, thisfunction hes so irout arpument
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

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
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