Contents

Overview

The programming assignments in this class are going to be geared toward building a single application: a post it notes program—we'll call it Notes to avoid any trademark issues :). In each assignment, you'll have to update your previous assignment, improving its capabilities using the skill you've learned in the interim.

Your job in this assignment is to create the first iteration of the Notes program. Your program should be able to store two notes, which are initially blank. You should prompt the user a total of five times to modify a note, delete a note, or to quit the program. I would use the the characters m, d, and q to represent each of these options. In the event of the first two options, you should prompt the user which note to delete/modify. If the user wants to modify, you should also read in the text of the note. You will have to use getline(cin, note) (where note is the variable corresponding to the note you want to read in) to read in a multi-word note. This will also require that you issue cin.ignore() just before hand, to clear out the newline that is entered when the user provides the note id. If the user wants to quit, you should display a nice exit message (e.g., "Bye!") and then use exit(0); to exit the program (you need to add the line #include <cstdlib> at the top of your file to use exit(0)).

Here's an example of my version of PA1 running (my input is in orange just to make it obvious):

$ ./pa1 
Current notes:
Note 1: 
Note 2: 

Would you like to [d]elete|[m]odify a note or [q]uit? m
Which note would you like to modify? 1
Please enter the new note: My first note!!!

Note 1: My first note!!!
Note 2: 

Would you like to [d]elete|[m]odify a note or [q]uit? m
Which note would you like to modify? 2
Please enter the new note: My SECOND note!

Note 1: My first note!!!
Note 2: My SECOND note!

Would you like to [d]elete|[m]odify a note or [q]uit? d
Which note would you like to delete? 1

Note 1: 
Note 2: My SECOND note!

Would you like to [d]elete|[m]odify a note or [q]uit? q
Okay, goodbye!
(Back to top)

Requirements

Here's a skeleton to get you started:

(Back to top)

Extra credit

Make sure you indicate in your program header (in the description) whether you've attempted the extra credit, otherwise I won't count it!!!

EC-1 (2 points)

Make your program hold five notes, not just two.

EC-2 (5 points)

Add some extra functionality, like the ability to copy or move notes. You can be creative here, but make sure you let me know ahead of time what you want to do so I can let you know if it's sufficient.

(Back to top)

Submissions

Everything should be uploaded to Canvas by the deadline posted.

(Back to top)