Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c++ For your lab, you will create a program to manage a simple to do list. Each item on the list should be an object

c++ image text in transcribed
For your lab, you will create a program to manage a simple to do list. Each item on the list should be an object of a ToDoltem class, which contains the following members A string attribute for storing the item text. A Boolean attribute to indicate the status of the item (Finished or Unfinished). Gets/Sets and Constructors as you deem necessary. The To Do List itself should be represented as an array of ToDoltems, Initially, size the array to store five items. However, if items are added to the list that would exceed this number, the array should be resized to accommodate the new elements. When your program begins, and after you have initialized the list, the user will be presented with a simple menu, presenting them with options to Add an Item, Te Do Listi 1. Add an Item Toggle Iten Status List All Itens Toggle Item Status, List all Items, and Exit. This can be seen in the sample screenshot to the right. Note that you do not need to provide an option to delete an item (completed items will stay on the list, and just be flagged as completed. Exit List If the user chooses to Add an Item, they will be prompted to enter the item's text. That item will be added to the list at the next empty location, and then the user will be returned to the main menu. If the user chooses to Toggle Item Status, they will be presented with a numbered listing of all current list items and their status (not including empty locations in the array, if any exist), as well as a Return to Main Menu option. Selecting "Return to Main Menu" returns without changing any item statuses, while selecting any other item will toggle the status of that item to its opposite (Finished if originally Unfinished, and vice versa). After toggling an item, the user should then be returned to the Toggle Item Status menu, now updated to show the changed status. This can be seen demonstrated in the screenshots below. TOggie Iten Completion Oggie iten Conpletion Tegle iten completion unfinished | Finish Review Lab 2i unfinished i Check Enail Di unfinished | Do Lundry 4 teturn to Hain Menu al Finished | Finish Revie Lab Unfinished | Check Enail Finished | Do Laundry Return te Hain Menu Pnished | Finish Review Lab unfinished | Chack Enail bi unfinished | De Laundry 4 Return to Main enu If the user selects List All Items, your program should simply list all of the items and their statuses (as you already have done in the Toggle Item Status option)

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_2

Step: 3

blur-text-image_3

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

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions