Project on Structures

Hello ! I am a beginner to C++ and I have to make a project as Homework on structures. I`m not asking you to make my homework I just want to know if you can give me a starting point, in fact that`s what I`m asking for. Please sacrifice some of your time and read the project`s requirements.
" At a shop were brought "n" sortiments of groceries (numbered from 1 to n),the amount for every sortiment is known (expressed in pieces) , the acquisition price and the commercial addition (expressed in % of the acquisitions price) . In one week there were counted by days the quantity of every sold product. Make a program that shows the maximum value of sales made in one day and the value of sales made weekly by a "x" product."

If you read all that Thank you a lot. The thing is that I know what I got to do ,but I don`t know how to start. I need to tell that in the program may be used : Structures,functions,strings. [mostly structures]

I want to thank all of you who helped me here and invested time! I hope I will be able to repay you sometime!
Begin, where coders usually begin; with paper or notepad or VI and lay out your requirements, followed by your FNC()'s, followed by you var's ( with a good naming convention.)
Then, develop your program using Pseudo code first !
=====
// REQUIREMENTS
#1)- " At a shop were brought "n" sortiments of groceries (numbered from 1 to n),

#2)- the amount for every sortiment is known (expressed in pieces) ,

#3)- the acquisition price and (expressed in % of the acquisitions price)
the commercial addition (expressed in % of the acquisitions price) .

#4)- In one week there were counted by days the quantity of every sold product.

#5)- Make a program that shows the maximum value of sales made in one day and

#6)- the value of sales made weekly by a "x" product."
// =====================
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

// PROGRAM STRUCTURE & LAYOUT

#include stdio.h
Main() 

 {

GetItems()  //  ( #1)
.....from 1 to 5
..........GetAmts()  // ( #2 )


Convert() // convert act & comm prices to %  ( #3)

Weekly_tally()  // ( #4 ) 

Max_Day_Val()  // (#5) 

Single_Week_Sale()  // (#6) 

RETURN 0;

 }   // EOF -  EOR 


Now continue to break-down each piece, each subrt'n into more, and more, greater and greater detail until it's functional - THEN type it into your compiler and test it.

Remember to use VAR names that ate meaningful; not x,y,z, or amt, type, rtn, this,that, more,
but more like this:
INT i_sales_Rate
DOUBLE d_product_percent
a_weekly_array[i_max_arry_val]

BTW, a "Structure" is only a grouping of vars - so this will be a lst step in your design phase.




Last edited on
Topic archived. No new replies allowed.