Classes and Enumerators Using C++
Not what you're looking for?
Use the type Date (consisting of a month name, day number, and a year number) to develop a class Event to model events scheduled for specified dates. use this class in a program that reads several events and stores these in a vector of Events. After all the events have been entered, the program should display a schedule of events in chronological order. Attached are the program files for structure/class and sorting. I need in c++ hide problem
Purchase this Solution
Solution Preview
See below and attached files.
================
// events.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <conio.h>
#include <ctime>
using namespace std;
#include <iostream>
#include <ctime>
using namespace std;
class Date
{
private:
short month, day, year;
public:
friend bool operator ==(const Date& d1, const Date& d2);
friend bool operator <(const Date& d1, const Date& d2);
void init(void);
void init( int month, int day, int year);
void print(void);
Date(int m, int d, int y);
Date () ;
};
bool operator <(const Date& d1, const Date& d2)
{
if (d1.year < d2.year) return true ;
else if ((d1.year == d2.year) && (d1.month < d2.month)) return true ;
else if ((d1.year == d2.year) && (d1.month == d2.month) && (d1.day < d2.day)) return true ;
else return false ...
Purchase this Solution
Free BrainMass Quizzes
C++ Operators
This quiz tests a student's knowledge about C++ operators.
Basic Networking Questions
This quiz consists of some basic networking questions.
Word 2010: Tables
Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.
Excel Introductory Quiz
This quiz tests your knowledge of basics of MS-Excel.
Basic UNIX commands
Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.