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?