Programming Homework Help

Programming Homework Help. Arrays and Strings with C Code

Program Description
Compute the value of the ticket sales for concerts and the total sales for a series of concerts. Then
display the concert information in a sorted list.
Technologies used in this project:
 strings stored as char arrays
 2 dimensional char and int arrays
 getting data from the user into the various arrays
 using only part of an array for valid data
 computing array arithmetic – vector inner products to compute a value
 sorting using selection sort
 displaying data in arrays

Interaction
Outline:
1. Get the ticket price for each 3 categories.
a. float float float
2. Get the band name and numbers of fans for each category of each concert.
a. String int int int
b. NOTE: spaces are not allowed in the band names, so use underscores instead of spaces.
c. Period will end the input.
3. Internal computations:
a. Compute the value of the sales for each concert.
b. Compute the total value of the ticket sales.
c. Sort the concerts by value of the ticket sales.
4. Display the resulting data in a nice format.
Notes:
1. This program is not expected to behave nicely if the input does not follow the specifications
above.
2. All numbers this program will handle should be of moderate size. The exact meaning of
moderate is made precise by the data types, print statements, and array sizes.
Page 2 of 12

Analysis
1. Since we are going to do sorting, we will need to hold the data in arrays.
2. We will use functions to simplify the code, and reflect a modular approach to the design of the
project.
3. We will use global variables to reduce the amount information transferred in parameter lists.
4. We will use a fixed number of categories, but let the number of concerts by determined by the
user at run time, up to a maximum value.
5. The user will end inputting the group information with a flag value, a period.
6. Basic data types
a. ticket prices – float
b. name of concert/band – char array
c. number of concerts and number of fans in each category at each concert – int
d. number of concerts – int.
e. value of tickets – float
7. We will use nested loops to handle most operations:
a. reading the ticket prices
b. reading the group name and attendance
c. computing the value of the ticket sales
d. printing the array of data
e. sorting the arrays by the value of the ticket sales

Programming Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"