Given the "Document" class below, you will write a basic version of Google Drive. Your program will store two lists of documents, one for documents the user has created and one for created documents the user has shared with a friend. The user will have a few options which you will need to implement (note: the menu will only be displayed once at the beginning of the program): Add a document to the user's list: Allow the user to enter the document name, document extension, and document contents and then add that Document to the list of documents Example Input/Output: Choose an option below: 1. Add a document to your list 2. Rename one of your documents 3. Share one of your documents with your friend 4. Display all of the documents 5. Quit 1 Enter the document name: MainLab1 Enter the document extension: doc Enter the document content: #include .... Enter option: Rename one of the user's documents Allow the user to enter the index of the document in their list they want to rename Allow the user to enter the updated name of that document Set the name of the document to be the updated name they enter Example Input/Output: Enter option: 2 Enter the index of your document you want to rename: 3 Enter the updated name of the document: MainLab3 Enter option: Share one of the user's documents with a friend Allow the user to enter the index of their document they want to share with their friend Example Input/Output: Enter option: 3 Enter the index of your document you want to share: 6 Enter option: Display all the documents in both the user's and the friend's list. Print all the information about all the documents in the user's list Print all the information about all the documents in the friend's list Example Input/Output: Enter option: 4 -------------------Your List------------------ Name: MainLab1.cpp Contents: #include .... Name: REL_A_131_Paper.doc Contents: In the Book of Mormon, one of the main... Name: American-Heritage-Study-Guide.doc Contents: The Spanish Armada was a... Name: Physical_Science_100.ppt Contents: Slides for Physical Science Presentation... --------------Your Friend's List-------------- Name: American-Heritage-Study-Guide.doc Contents: The Spanish Armada was a... ---------------------------------------------- Think about what type of object you want your vectors to store (hint: you want any change in the document you share with your friend to change in your list AND their list). At the end of the program, free up any memory you may have allocated. Note - do not worry about error checking for invalid indexes.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

This question is from C++

 

Given the "Document" class below, you will write a basic version of Google Drive. Your program will store two lists of documents, one for documents the user has created and one for created documents the user has shared with a friend. The user will have a few options which you will need to implement (note: the menu will only be displayed once at the beginning of the program):

  • Add a document to the user's list:
    • Allow the user to enter the document name, document extension, and document contents and then add that Document to the list of documents

Example Input/Output:

Choose an option below: 1. Add a document to your list 2. Rename one of your documents 3. Share one of your documents with your friend 4. Display all of the documents 5. Quit 1 Enter the document name: MainLab1 Enter the document extension: doc Enter the document content: #include <iostream> .... Enter option:

  • Rename one of the user's documents
    • Allow the user to enter the index of the document in their list they want to rename
    • Allow the user to enter the updated name of that document
    • Set the name of the document to be the updated name they enter

Example Input/Output:

Enter option: 2 Enter the index of your document you want to rename: 3 Enter the updated name of the document: MainLab3 Enter option:

  • Share one of the user's documents with a friend
    • Allow the user to enter the index of their document they want to share with their friend

Example Input/Output:

Enter option: 3 Enter the index of your document you want to share: 6 Enter option:

  • Display all the documents in both the user's and the friend's list.
    • Print all the information about all the documents in the user's list
    • Print all the information about all the documents in the friend's list

Example Input/Output:

Enter option: 4 -------------------Your List------------------ Name: MainLab1.cpp Contents: #include <iostream> .... Name: REL_A_131_Paper.doc Contents: In the Book of Mormon, one of the main... Name: American-Heritage-Study-Guide.doc Contents: The Spanish Armada was a... Name: Physical_Science_100.ppt Contents: Slides for Physical Science Presentation... --------------Your Friend's List-------------- Name: American-Heritage-Study-Guide.doc Contents: The Spanish Armada was a... ----------------------------------------------

Think about what type of object you want your vectors to store (hint: you want any change in the document you share with your friend to change in your list AND their list). At the end of the program, free up any memory you may have allocated. Note - do not worry about error checking for invalid indexes.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Function Arguments
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT