Scenario
You are doing a fantastic job at Chada Tech in your new role as a junior developer, and you exceeded expectations in your last assignment for Airgead Banking. Since your team is impressed with your work, they have given you another, more complex assignment. Your task is to build an item-tracking program for the Corner Grocer, which should incorporate all of their requested functionality.
The Corner Grocer needs a program that analyzes the text records they generate throughout the day. These records list items purchased in chronological order from the time the store opens to the time it closes. They are interested in rearranging their produce section and need to know how often items are purchased so they can create the most effective layout for their customers.
Directions
As you work, check your code’s syntax to ensure that your code will run. Note that when you compile your code, you will be able to tell if this is successful overall because it will produce an error message for any issues regarding syntax. Some common syntax errors are missing a semicolon, calling a function that does not exist, not closing an open bracket, or using double quotes and not closing them in a string, among others.
The program that the Corner Grocer is asking you to create should address the following functional requirements:
Menu Option One:
- Prompt a user to input the item, or word, they wish to look for.
- Return a numeric value for the frequency of the specific word.
Menu Option Two:
- Print the list with numbers that represent the frequency of all items purchased.
The screen output should include every item (represented by a word) paired with the number of times that item appears in the input file, CS210_Project_Three_Input_File.txt. For example, the file might read as follows:
- Potatoes 4
- Pumpkins 5
- Onions 3
Menu Option Three:
- Print the same frequency information for all the items in the form of a histogram.
- Then print the name, followed by asterisks or another special character to represent the numeric amount.
The number of asterisks should equal the frequency read from the CS210_Project_Three_Input_File.txt file. For example, if the file includes 4 potatoes, 5 pumpkins, and 3 onions, then your text-based histogram may appear as represented below. However, you can alter the appearance or color of the histogram in any way you choose:
Potatoes ****
Pumpkins *****
Onions ***
Menu Option Four:
- Exit the program.
Data File Creation:
Create a data file, with the naming convention frequency.dat, for backing up your accumulated data. The frequency.dat file should include every item (represented by a word) paired with the number of times that item appears in the input file.
This output file is created in the beginning of the program without user intervention and is for backup purposes. For assistance with writing files, see sections 7.1, "File Input," and 7.3, "File Output," in zyBooks.
Documentation:
Describe your code’s design and functionality. Include screenshots to support your description. As you complete this work, your manager at Chada Tech is interested to see your thought process regarding how you use C++.
Implementation Guidelines
Note: We recommend using the Virtual Lab to complete this assignment. However, if you choose to complete this assignment locally, please use the version of Microsoft Visual Studio outlined in the syllabus. The SNHU IT Service Desk will be unable to support concerns related to local assignments.
- For this assignment, your implementation plan must include at least one class with public and private sections. For assistance with classes, see sections 6.2, "Using a Class," and 6.3, "Defining a Class," in zyBooks.
- For this assignment, we recommend using Maps (section 11.4 in zyBooks) for implementation. Maps do require precise coding syntax. However, you can choose a different implementation option.
Apply industry standard best practices such as in-line comments and appropriate naming conventions to enhance readability and maintainability. Remember that you must demonstrate industry standard best practices in all your code to ensure clarity, consistency, and efficiency. This includes the following:
- Inserting in-line comments to denote your changes and briefly describe the functionality of the code
- Using appropriate variable, parameter, and other naming conventions throughout your code
Optional Challenge: User Input Validation
Validating user input is a coding best practice. For an additional challenge with this assignment, use input validation and error handling to anticipate, detect, and respond to run-time and user errors (for example, make sure you have option four on your menu so users can exit the program).
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 4 images
- What exactly are events and how do they work in JavaScript and jQuery? Do you have any specific examples of what it is you're talking about? What exactly does it mean to "handle events"? Why is event management such an important component of interactive design? Is there anything I can do to make it less difficult for me to read the handwriting you've written?arrow_forwardRespond to parargaph below with one scholarly paragraph with constructive criticism. My first choice was database management would be GUI ( graphical user interface).GUI has been considered the standard of user-centered design, providing users with the ability to interact and operate electronic devices. It's more user-friendly than CLI ( command line interface ). GUI is easier to use and learn, offering immediate visual feedback. GUI has the option for creating scripts using programming software, making programming easier for someone who doesn't know all the syntax or commands. The ability for remote computer access is available with a graphical user interface, making it easier for professionals to manage servers and access computers remotely.arrow_forwardThe most convenient way to get a piece of application software is to... Do you have any pertinent instances to back up your claim?arrow_forward
- Consider the challenges you'll face as you build the framework, and look into anything that might undermine your efforts. Do solutions exist in the cloud that might fix these problems? Can anything unfavourable really happen?arrow_forwardYour business has seen considerable growth, which has resulted in a large rise in the use of file servers all at once. All of the file servers are located in close proximity to the customers, and you're planning to add many more, resulting in a large number of servers in the area. In recent years, there has also been a rise in the number of namespace servers. Your initial configuration made use of the default settings for the referral ordering system and polling, which were both enabled in your original configuration. What alterations should you consider making to your home?arrow_forwardWhat causes bugs? It's unclear how problems become up in a piece of software. Illustrate your point using specific instances.arrow_forward
- Having a firm grasp of the significance of a program's settings is crucial. Where do we stand on the procedures involved in configuration administration?arrow_forwardExplain why having deep access rather than shallow access is beneficial from a developer's point of view rather than basing your case just on performance.arrow_forwarda picture of a front panel and block diagram will be okay. and the functions of the components used.arrow_forward
- In terms of programming, it's preferable to have a deeper rather than a shallower level of access, so don't base your decision just on performance.arrow_forwardIn this article, we'll go through what makes a good user interface and how to describe those features. Which abilities stand out as must-haves? How many systems do you plan to address similarly? Provide a concrete illustration of your point.arrow_forwardThe most convenient way to get a piece of application software is to... Do you have any pertinent instances to back up your claim?arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education