Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

General requirements : - No global variables - No multiple return statements in one function - Show how you have tested these functions - cin

General requirements: - No global variables - No multiple return statements in one function - Show how you have tested these functions - cin and cout are not allowed in these classes. They can only be in main() or testing functions - These classes should not provide the default constructor. - Show how these classes being used to create objects and how these methods are being called and return proper values. Note: this is an exercise to define and use C++ classes, objects and methods.

Question #2: Define a C++ class named "WeeklyTask" that manages a task name (string) and a day in a week (1 through 7 where 1 is Sunday and 7 is Saturday).

It should provide at least the following three methods: "isBusy" method to compare with another WeeklyTask object and return true if both has the same week day and false otherwise. "contains" method that accepts a search string and returns true if the task contains that search string and false otherwise. "toString" that returns a string represents the WeeklyTask object in the following format of "TASK(name) DAY()" such as "TASK(Go to school) DAY(Monday)" or "TASK(Pay bill) DAY(Tuesday)" or "TASK(Buy grocery) DAY(Saturday)"

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mobile Communications

Authors: Jochen Schiller

2nd edition

978-0321123817, 321123816, 978-8131724262

More Books

Students also viewed these Programming questions