Archive for May 11th, 2018

PROGRAM DESCRIPTIONThe main attraction of Summerville SeaWorld is no longer simp

PROGRAM DESCRIPTIONThe main attraction of Summerville SeaWorld is no longer simply a proposition anymore: the Porpoise Pond is a great hit with the local water-fun crowd! Your planning was critical to getting the project off the ground so to speak and lots of grinning kiddies all wet. Congratulations! But only now has the boss discovered a missing link in the business plan: a way to analyze the receipts and categorize exactly how well the attraction is doing. Time for one more great C++ program. This is sure to cement your reputation again so to speakJ and ensure you will be in high demand by businesses all over the low country.The company ticket sales information is all sent to a data file to record each day s activity. But since the data arrives electronically from approximately 7 10 sales booths there is no way to record anything but the basic sales data. No one has figured out a way to capture the summary data when a booth is shut down. So your program will access a daily sales file and work with the raw data.
RECORD DESCRIPTION
You ll need a copy of the data file to work with the file s name is ssw-sales.dat. Once you have your solution and your project created place the data file into the project subdirectory (the same place that you see the .CPP file). Note: if you are working with the shell provided by your instructor this will have been taken care of already.Each record in the file contains data on one sale to one customer. Here is a description of each of the fields for all records:FIELD TYPE DESCRIPTION EXAMPLESDate string Date coded as a string 10/11/2010Ticket type char Single character code for the type of ticket C J A (Child JuniorAdult)Ticket quantity int How many tickets purchased all of the same typeCoupon char If customer had a discount coupon Y or NTicket cost double Actual cost of the ticket(s)Each record is on a separate line and fields are separated by a space.For each record display the following on one line: a line number; the type of ticket sold interpret the character and display either Child Junior or Adult; the quantity of tickets purchased; whether or not the customer had a discount coupon (display either YES or NO); the actual cost of the tickets if the ticket is a Child ticket then leave this entry blank don t display zeros; and the difference if any between the actual cost and what the user should have been charged. (If the ticket is a Child ticket leave the coupon and the actual charge columns blank: there is no use displaying any of that for free tickets!)The reason for the final column is that we have had some malfunctions in the ticket-selling equipment at least that s what those minimum-wage ticket operators are saying and we think that some tickets have been underpriced . So after you display the charged amount the dollar value that came from the file compute the actual amount that should have been charged. Then subtract the computed amount from the actual charge and display the difference. (To remind you adult tickets are $11.50 and junior tickets are $7.50 at full price.)For example suppose the ticket file has a sale for 6 Junior tickets and does not show any discount coupon. That means the charged price for the tickets should have been $45.00. But the file contains a charge of $33.75 a discounted price! Someone s selling tickets at a discount without approval! The way this should look in the listing would be like line #4 in the listing below. In the listing the fourth line shows we are short $11.25 for that particular ticket sale.Display column headers at the top of the report so the table of ticket sales looks like well a table. The listing should start out looking very similar to this for the actual file:# TYPE QTY COUPON ACTUAL CHG DELTA1 Adult 2 NO 23.00 0.002 Junior 4 YES 22.50 0.003 Child 84 Junior 6 NO 33.75 -11.25(NOTE: dollar items in two decimal places and lined up right-justified. And no entries for the Child tickets after the quantity column.)Separate functions required. There are two mandatory functions you must design and use in this program. First to display the type of ticket like Adult or Junior use a separate function to test the ticket type code and return the appropriate string to display: do not do any output inside the function. Main should be the only place that you print entries for the table on screen. Second use a separate function to compute the delta column: calculate the true cost of the tickets; compute the difference between that and the actual charged value; and return the value to be displayed in the DELTA column. These two functions are mandatory: if you skip either one your program will suffer a stiff point penalty. The use of other functions is not mandatory but highly encouraged.When you re finished processing individual sales records clear the screen and display a polished final summary containing the following information:Number of records included in the database (in the report too of course!)Totals for each type of ticket: for each type display the total number of tickets of that type and the total dollars received for that type. (So this means six separate totals two for each ticket type.)Total dollar sales overall.Total dollar amount over or under the actual revenue. (In other words the total of the delta column.)Last identify the ticket type that had the highest number of tickets sold and how many were sold. Make this a separate announcement at the end of the report simply to highlight who is getting wettest in our new attraction! For example: The largest ticket type sold was toddler tickets: we sold a grand total of 79 toddler tickets.Note: this is not the right answer for the data file you have just an example of the output. One other note: be careful that you don t make any changes to the data file and then alter the code to reflect those changes. Your instructor will be using an entirely separate data file whose format matches the file you have been given. What that also means is that if you give up on any part of the required logic and decide to just compute some answers and code those answers that will be plain as day to your instructor! In those circumstances it would be better to simply skip that part of the output.This C++ solution should be Program7 Solution name. Zip the solution for submitting as usual.
TURN IN: a data dictionary for this program a complete flowchart and the zipped solution directory. Submit everything using the Dropbox of course.
After your final summary call another function to perform some additional analysis on the data file. Reopen the file and calculate how much money we are losing with the coupon business. For each ticket sold with the discounted coupon price figure out the cost without the coupon and then the savings for each of those customers. Add all of the savings values up to see how much revenue the coupon sale is costing us. Display that total so the boss can see how much money was sacrificed to coupon sales and can possibly make a business decision: we may need to curtail how often the coupons are printed or maybe reduce the value of a single coupon. (I m making this a separate file processing module so you don t have to fold it into your original program. Certainly the best way to accomplish this task would be to do just that; but keep it separate for purposes of this extra credit.) Make sure your flowchart includes this module.
Attachments:

PROGRAM DESCRIPTIONYou are going to revise the ticket-processing program (Progra

PROGRAM DESCRIPTIONYou are going to revise the ticket-processing program (Program #5) to make it a more professional program one that will be more representative of commercial program design. You have now studied the use of additional functions to aid main in the overall processing. Real computer programs consist of many of these functions. Some are pretty small intended to perform a simple but very important calculation. Others are a bit larger in scope. For this program you will need to revise Program #5 to incorporate such functions.Since Program #5 is the background for this program you will definitely want to have its directions handy. I will leave out many of the details that you can glean from Program #5 and simply concentrate on the changes required. Essentially when you have this program finished it should perform nearly the same as Program #5 did. Of course you might want to improve some of its look and feel but the ticket-selling operation should still work the same.
SPECIFIC DIRECTIONS
Use the following functions by name in your design for this program. If you wish to use more that s OK as long as you include these as well. Hint: you will find it easiest just to accumulate all the final totals in main.main Your central loop will be here as well as a lot more. Use the other functions for their specific purposes.get_ticket_type Present a menu of the three ticket types and an option to quit. Input the user s choice and make sure it is a valid choice. If it is invalid then ask for another choice. Keep asking until the user enters a valid ticket type. Return to main the user s choice.find_ticket_price Receives the ticket type and returns the price of one ticket including free tickets!apply_discount Receives the ticket cost applies the discount and returns the discounted cost.disp_purchase Displays the information for one customer purchase: the type of ticket(s) purchased; how many were purchased; and the cost of the purchase. (If the cost is the discount cost only show that not the original cost.)disp_final_report Format and display the final numbers. See the totals required to be displayed and an example report in the Program #5 directions.Before displaying the final report you must clear the screen so the final totals will look great! Your final results must be laid out in a business-like report with headings etc. A simple bunch of statements like Total number of tickets sold: 1345 will not be acceptable.This C++ solution should be Program6 Solution name. Zip the solution for submitting as usual.
TURN IN: a data dictionary for this program a complete flowchart and the zipped solution directory. Submit everything using the Dropbox in D2L.
How much money did we lose by selling some tickets at a discount? After the final report display how many tickets of each type that were purchased with discount coupons and also display how much more money we would have made if we hadn t accepted the coupons at all. (We may get greedy and cancel this program if it cuts too much into our revenue!)

CSC 115 Program #8Fall 2013Due: December 2Creating a DictionaryThe file wordlist

CSC 115 Program #8Fall 2013Due: December 2Creating a DictionaryThe file wordlist.txt contains a list of words one word per line. Write a program that inputs the words sorts them into alphabetical order and writes them to an output file called dictionary.txt.The input file contains an arbitrary number of words up to a maximum of 1000. There is no sentinel at the end of the data. Your program must include:Instructions for Turning in Your ProjectI will not grade your project and you will receive a score of 0 if you do not comply with these instructions. You must turn in all materials by the date and time listed at the beginning of this handout. Your submission is not complete and I will not grade it until you have turned in all the required materials. Anything that is not turned in by the deadline will be marked at least one day late and will receive a grading penalty as specified in the syllabus.Turn in these things: Turn in a printed completed copy of the project form. There is a blank project form in the CSC115 Handouts folder on the server. Turn in a printed copy of your source-code file. In your CSC115 TurnIn folder on the server create a folder called Project #8. Place a copy of your source-code file in the Project #8 folder. Do not place anything else in the project folder other than the source-code file for this project.
Attachments:

1. Create a small Family database with one table to include data about members o

1. Create a small Family database with one table to include data about members of your family. Include data fields such as family member number first name last name type of relationship hometown and age. You can be creative with the family member number or use the autogenerated number from the database. It must be a unique value; each member of your family must have a different family member number. Populate the database with members of your family. Be sure to include data about yourself in the table. Place at least 10 records in your database table even if it is necessary to make up information. The type of database can be SQL Server or Access. Write a C# program to display all of the data that appears in the database table on a data grid. 2. Using the database created in the previous part modify your solution to only display the names of the members of your family in a data grid. Dock the grid so that it fills the form. Change the color of the data grid columns increase the size of the font choose appropriate headings for your columns and format the grid control so that it is professionally aesthetically appealing.