To Do, with Class

This assignment is intended to see if youve learned the basic concepts talked about thus far in the lectures.

This assignment requires the use of classes, the last few assignments in this course will build upon the ideas used in this assignment.

Program

In this assignment, you will define a class that works with the provided file: A09.cpp, that is, it implements the features used by the provided code.

  • The class can contain whatever youd like! (implement it however youd like)
  • You will submit only the code for the class, ToDo.cpp and ToDo.h

You must inspect the given code (A09.cpp) and determine for yourself what is needed to implement in the ToDo class. The code in the provided A09.cpp will be used to evaluate your implementation of the class ToDo.

Execution

The programs entry point, and procedural control has been written for you in A09.cpp, an unmodified version of this file will be used to evaluate your code.

When the original A09.cpp is compiled and executed it should function correctly when your ToDo class is included.

A09.cpp:

  • Creates a random (3-6) number of random (1-9) priority ToDo objects, putting them into a dynamic array of ToDo pointers.
  • Lists the objects, showing priority and task
  • Shows the ToDo object with the highest priority (lowest value)
  • Increases the priority of the last ToDo object in the list by a random amount
  • Shows the ToDo with the resultant highest priority (lowest value)
  • Checks that all ToDo objects have a valid priority (>=1) and crashes if they do not, your implementation must NOT crash.

Sample

The tasks are:
Priority Task
7 Work on vacuuming
6 Eat guitar
3 Work on homework
6 Play games

You should work on:
:==> Work on homework

But if i increase the priority of: Play games by 4

You should work on:
:==> 2: Play games
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.