Hello all! I just joined this forum in need of major help. I got this program to write as one of my final grades in a class im taking. I was wondering if anyone could help me (if you wanna do it... that would be awesome, i got 3 other finals in 2 days as well. Save me some time :) ) but i need some help figuring out where to begin. I've gone throught the book all last night and couldn't really get arrays and everything called in loops. Can anyone help me code this??

Program i have to write:

"The Widgets 'R' Us comapny hires 4 salespersons named Larry, Moe, Shep, and Curly. Each salesperson may establish the price of the widgets that he sells, but he must sell all of his widgets for the same price. All commissions are calculated at 10% of sales.

Example of array info (you will not use commas):

Name #Sold Price Commission
____________________________________________

Larry 8000 1.25 1000.00
Moe 5025 1.10 552.75
Shep 950 2.00 104.50
Curly 9980 1.15 1147.70
____________________________________________

Design (using IPO chart) and write program with following requirements:

1) You must use four parallel arrays. You will have an array for names, number of widgets sold, the amount each widget sold for, and the commission.(Don't forget to use the string class where necessary.)
2)The values for you name array are to be initialized at declaration.
3)The values for you rnumber of widgets sold, and price per widget are to be input interactively. You must use 1 function to input the number of widgets sold and the commission (not two). You will call this function using a loop to input the data for each salesperson individually. Your parameters will be individual array elements (not any arrays as a whole). And you must take over the name of the salesman. For example:
"Please enter the number of widgest sold and the price per widget for Larry: "

4) The values for your commissions are to be calculated. You must use one function for calculating the commission. You will call this function using a loop to calculate the commission for each salseperson. Your parameter will be an individual array element (not the array as a whole).
5)You must use one function to write to a file name, number of widgets sold, the amount of each widget and the commission. You will call this function one time and write the data for each salesperson in a line separating each item by a space. Your parameters will be entire arrays, not array elements. Your float values should show to 2 decimal places.


Lemme know if anyone can help?please?

Recommended Answers

All 4 Replies

http://www.daniweb.com/techtalkforums/announcement8-2.html

I got three finals on the same day too, so I feel your pain, but you gotta at least put some effort into it. Not to mention if your teacher is smart he/she is using plagiarism detection software and having someone else code your programs for you could get you in to VERY BIG trouble...

>if you wanna do it... that would be awesome
Sorry, but that's not going to happen. We're not a homework service.

>Can anyone help me code this??
No, but we can help you understand it and help you correct and problems in the code you write as well as suggest better ways of solving the problem. However, only one of those doesn't involve you writing at least some code first. The other requires you to specify what part of the problem you don't understand. Just posting the whole thing with a "Help me!" statement isn't going to get you very good help.

Larry 8000 1.25 1000.00
Moe 5025 1.10 552.75
Shep 950 2.00 104.50
Curly 9980 1.15 1147.70

why dont you use
const int widgets=3
const int names=4

enum dudes { write those names hereee}
int array[names][widgets]={ write numbers... blah}
int row,int col;

input the values,then use a series of for loops to retrieve the numbers to then do the calculations... im new in c++ so do not take my recommendations if you think they are wrong :D.

I was wondering if anyone could help me

We certainly can help...

(if you wanna do it... that would be awesome, i got 3 other finals in 2 days as well. Save me some time :) )

Oops, you just lost my help here. If you had left out this blatant "I'll cheat if you'll let me" request, we could have it done... Sorry.

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.