100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COS1512 ASSIGNMENT 2 SEMESTER 2 2022 R55,92   Add to cart

Exam (elaborations)

COS1512 ASSIGNMENT 2 SEMESTER 2 2022

 3 views  0 purchase

COS1512 ASSIGNMENT 2 SEMESTER 2 2022. Consider the following structure used to keep record of a meeting: struct Meeting { string speaker; string topic; string venue; string date; } Turn the meeting struct into a class. The class should have member variables for all the values in the corres...

[Show more]

Preview 2 out of 8  pages

  • September 8, 2022
  • 8
  • 2022/2023
  • Exam (elaborations)
  • Questions & answers
  • cos1512
All documents for this subject (34)
avatar-seller
STUDYLAB2023
COS1512
ASSIGNMENT 2
SEMESTER 2
2022

, COS1512 Assignment 2 Semester 2
UNIQUE NUMBER
DUE DATE:


TUTORIAL MATTER: Chapters 10, 11, 12 and 15 of the Study
Guide (Tutorial Letter 102 available under
Additional Resources on the COS1512
website on myUnisa )

Chapters 10, 11, 12 (excluding “Creating a
Namespace”) and 15 (only 15.1 “Inheritance
basics”) in Savitch
Appendices 7 and 8 in Savitch

WEIGHT: 80%




Question 1
Consider the following structure used to keep record of a meeting:
struct Meeting
{
string speaker;
string topic;
string venue;
string date;
}
Turn the meeting struct into a class. The class should have member variables for
all the values in the corresponding struct. Make all member variables private.
Include public member functions for each of the following:

 a default constructor that sets the string data members to blank strings;

 member functions to set each of the member variables to a value given as an
argument to the function (i.e. mutators);

 member functions to retrieve the data from each of the member variables (i.e.
accessors);

Test the class in a program that instantiates an object of classMeeting (i.e. ‘declare’
an object of ‘type’ Meeting). The program should then input values for the object
(obtained from the keyboard), and use the mutators to assign values to the member
variables. Use the accessors to obtain the values of the member variables of the object
and display those values on the screen. Test your program with appropriate input.

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through EFT, credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying this summary from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller STUDYLAB2023. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy this summary for R55,92. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73918 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy summaries for 14 years now

Start selling
R55,92
  • (0)
  Buy now