Question
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(
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started