Here is the problem,


DEPARTMENT STORE SALES FILE DESCRIPTION

File name: DEPTSALES

Sorted by: Department

Field Description Data Type COMMENTS

Transaction Number Numeric a 6-digit number

Amount Numeric 2 decimal places

Department Numeric a 3-digit number

Using Visio create the flowchart that shows the logic for a program that would print each transaction’s details, with a total at the end of each department.

I just need some tips on how to get this thing started. This is a very confusing subject for me. Any help at all would be appreciated. Thanks.

Recommended Answers

All 9 Replies

Or if someone could just help me with the pseudocode I would also appreciate that.

1st u should try..let us know ur effort..we will help u for sure

This is What I got even though I don't think it is right.

Start
l
depttotal
grandtotal
hasinput
openinput
getnextrecord
currentdept
l
Print Title
l
get num department
l
department
l-----------------------------------------------------------
eof?----------------------------grandtotal= l
l numtransaction -----Print details
l num amount
Stop num department

Thanks for any help.

here is 1st tip for u:

seprate out the inputs,output,calclution(processing) and decision things from ur problem statement then place in right place and check it from start to end.


make ur problem statement more clear and 2 the point

I am pretty sure I did this flowchart wrong. Can someone tell me what I did wrong and possibly the correct way.

The flowchart is an image, http://www.sendspace.com/file/bxnlvb

Here is what it is for,

A soft-drink manufacturer produces several flavors of drink—for example, cola, orange, and lemon. Additionally, each flavor has several versions such as regular, diet, and caffeine-free. The manufacturer operates factories in several states.

Assume you have input records that list version, flavor, yearly production in gallons, and state (for example: Regular Cola 5000 Kansas). The records have been sorted in alphabetical order by version within flavor within state. Design the report that lists each version and flavor, with minor total production figures for each flavor and major total production figures for each state.

A soft-drink manufacturer produces several flavors of drink—for example, cola, orange, and lemon. Additionally, each flavor has several versions such as regular, diet, and caffeine-free. The manufacturer operates factories in several states.

Assume you have input records that list version, flavor, yearly production in gallons, and state (for example: Regular Cola 5000 Kansas). The records have been sorted in alphabetical order by version within flavor within state. Design the report that lists each version and flavor, with minor total production figures for each flavor and major total production figures for each state.

My first suggestion is that you create a sample of input data. That will aid you in visualizing what the report is to contain. Note that the input file is sorted in alphabetical order by version within flavor within state. For example:

caffeine-free Cola 5000 Alabama
diet Cola 5500 Alabama
regular Cola 7500 Alabama
caffeine-free Lemon 5000 Alabama
diet Lemon 5500 Alabama
regular Lemon 7500 Alabama
caffeine-free Orange 5000 Alabama
diet Orange 5500 Alabama
regular Orange 7500 Alabama
caffeine-free Cola 5000 Georgia
diet Cola 5500 Georgia
regular Cola 7500 Georgia
caffeine-free Lemon 5000 Georgia
diet Lemon 5500 Georgia
regular Lemon 7500 Georgia
caffeine-free Orange 5000 Georgia
diet Orange 5500 Georgia
regular Orange 7500 Georgia

The corresponding output should be similar to this:

State: Alabama

Flavor: Cola
caffeine-free 5000
diet 5500
regular 7500
Total Cola 18000

Flavor: Lemon
caffeine-free 3000
diet 3500
regular 5500
Total Lemon 12000

Flavor: Orange
caffeine-free 2500
diet 3500
regular 4500
Total Orange 10500
Total Production for Alabama 40500

State: Georgia

Flavor: Cola
caffeine-free 5000
diet 5500
regular 7500
Total Cola 18000

Flavor: Lemon
caffeine-free 3000
diet 3500
regular 5500
Total Lemon 12000

Flavor: Orange
caffeine-free 2500
diet 3500
regular 4500
Total Orange 10500

Total Production for Georgia 40500

The input consists of information about drinks: version, flavor, yearly production, and state. You will need a variable for each of these. For each get in your program, you will get all 4 pieces of data. These records are sorted in alphabetical order by version within flavor within state. In the example input and output the versions listed are caffeine-free, diet, and regular. The flavors are cola, lemon, and orange. States are Alabama and Georgia. These are not the only ones that may be in the input file and are used for demonstration purposes only. As you can see in the sample input, for the state Alabama, the flavors are sorted and within each flavor the versions are sorted.

Because this is a control break program, we know there is some special processing to be done for this report. What is that special processing? We must list a total for each flavor and a total for each state. Decide what variables will be used for the control breaks. There will be at least two!

You may want to begin by working on the code to produce totals for each flavor

He probably handed this in six months ago. If not, I doubt he is going to get credit for it at this point.

I wasn't able to complete the class. Therefore, I am retaking the class. This is very helpful and will help me. I thank you for the assistance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.