View the step-by-step solution to:

Objective : Writing requirements based code. A customer is in need of a computer program that will compute the daily sales of his shops.

Objective: Writing requirements based code.

A customer is in need of a computer program that will compute the daily sales of his shops. The customer owns a chain of stores, and is looking to modernize those stores. First he chooses to decorate each store with flowers to make it more attractive to customers.

The goods offered for sale in the merchants shop (with fixed prices) are: Bananas ($2.50), Oranges ($1.95), Apples ($2.85), Milk ($3.89), Bread ($1.25), Cake ($5.20), Light Bulbs ($1.30), and extension cords ($3.99).  You must identify 5 categories and a total of 20 items & prices for your project.

The customer would like the computer program to request, and an attendant to be able to enter the number of items for each good that were sold in the day. Then the program will compute and display the sale revenues per category (Fruits, Dairy, Bakery, and Others), followed by the total sale of the day. Then after subtracting the price of flowers bought to decorate each store (which you must request as an input from the attendant) and the constant cost of free handout to customers ($26.75), the program will display the net revenue of the day (Total Sales – Expenses). Highlighted text in sample output below is primary requirement for the customer).

*** Welcome to YOUR NAME Store Accountant*****

Please enter the number of Bananas sold: 7

Please enter the number of Oranges sold: 23

Sales Report

Fruits: $49.00     Dairy: $21.00      Bakery: $20.00 Others: 18.75

Total sale of the day: $108.75

Net revenue of the day: $101.00

*** Thank you, and come again! ***

Create a working computer program in C++ programming language: 10 points

You will earn 10 points for each of the following features you implement in your computer program:

float-double-int-string-bool Data Types (10), Logical Operator (10), Relational Operator (10), Function Declarations, Functions Definition and use ofFunctions (10), Objects Definition, Object Declaration and Use of Objects (10), Identification of Parts of a Computer Program (in comments) (10),while Loop (10), for Loop (10), Use of if or if-else Control Structures (10).

Optional: Other features correctly implemented will receive 5 points each if clearly identified (Arrays, Pointers, Multiple Cpp Files, Exit/Continue application option, object constructors, others...

Optional: Project Report (20 points), Oral test/presentation (20 points)

*Make sure to comment your code. MAKE SURE YOUR IDENTIFIERS ARE MEANINGFUL (no single letter).

Sign up to view the entire interaction

Top Answer

View the full answer
8898699.docx

Student’s name
University name
Instructor’s name
5th November, 2015 The desired code segment is as given below:
#include <iostream>
using namespace std;
// function definition and...

Sign up to view the full answer

Why Join Course Hero?

Course Hero has all the homework and study help you need to succeed! We’ve got course-specific notes, study guides, and practice tests along with expert tutors.

-

Educational Resources
  • -

    Study Documents

    Find the best study resources around, tagged to your specific courses. Share your own to gain free Course Hero access.

    Browse Documents
  • -

    Question & Answers

    Get one-on-one homework help from our expert tutors—available online 24/7. Ask your own questions or browse existing Q&A threads. Satisfaction guaranteed!

    Ask a Question
Ask a homework question - tutors are online