CS 160 - Programming Concepts and Applications

Summer II 2018 - Lab 7D - Calendar Event Class

Quick Links: Canvas | John Cabot | Piazza | zyBooks

|   Home |  Contact |  Syllabus |  Assignments |  Schedule |  Resources   |

This lab is due by Friday, August 3, 2018, 11:59 PM.


Concepts



Focus on defining an Event class from scratch.


Suggestion: Use NotePad or WordPad



Consider using NotePad or WordPad on your computer to write your code for this lab. Once you feel good about what you've written, then copy the code into your project. Doing this will help you see where you might make mistakes on the exam!

You should write a main.cpp that tests each feature of your class works as expected. You will need to submit your class declaration file, your class definition file, and your main.cpp file for this lab.


Event Class



Now that we have a way to represent a calendar date, we need a way to make entries into a calendar. Create a new class called Event that contains a data member of type Date from Lab 8A. In addition, add data members to track the event title and location. Functions you should include in your class:
  • A default constructor that sets the date to a default date (with the corresponding title and location for extra credit).
  • A parameterized constructor that allows a user to enter a new date object, title, and location (such as "8/1/1876" and its corresponding info for extra credit). The parameterized constructor should operate on a Date object and no longer the individual month, day, year pieces.
  • Appropriate getter and setter functions. The Date setter should operate on a Date object and no longer the individual month, day, year pieces.
  • A print function that prints the details in the form: MM/DD/YYYY: Title (location).


Lab Submission



You will submit your solution to this lab with the rest of Set7. Detailed instructions for doing this are posted in Assignment 7.


This lab is due by Friday, August 3, 2018, 11:59 PM.

Last Updated: 05/24/18 05:16


Valid HTML 4.01 Strict Valid CSS! Level Triple-A conformance, W3C WAI Web Content Accessibility Guidelines 2.0