PGCC CIS 1130 - Introduction to Programming Logic

Unformatted text preview:

CIS-1130 INTRODUCTION TO PROGRAMMING LOGIC 2009 USING THE C LANGUAGE PROJECT # 4 (25 points) ******************************************************** * * * The fourth project will be due on the second class meeting of the * * 12th week of classes. Have your materials available in a * * folder on the due date * * * ********************************************************* Program # 4 deals primarily with the concept of SELECTION. We will use both the "IF" statement and the "SWITCH/CASE " statement as part of a our code to generate a report which includes headers and a series of detail lines. As in program # 3, input data will be read from a disk file. A sample of the output is included. Your output does not have to look exactly like the sample but it should include all of the basic information. As in Program # 3, after you have entered your source code, compile it to make certain there are no syntaxerrors. If syntax errors occur, and remember they will, they need to be corrected before you resubmit your program. Do this over and over again until you get a "clean compile". ("COMPILE SUCCESSFUL"). When your program is properly compiled, run your program to see whether your output is correct. Because the input for the program is on disk, you must download a copy of the input file from the web. (The name of the file is "AUTODATA.TXT" Note: This is not the same data file used in program # 3!!). After you have executed (run) your program, you need to hand in the following items in your folder: (1) a listing of your source code R (2) the results of your program R (3) your data dictionary (4) Flowchart (5) a print spacing chart (6) hand calculations CIS-1130 (“C”)Program # 4 - pg. 2 PROGRAM SPECIFICATIONSINPUT: The INPUT RECORD layout for Program # 4 is listed below: (Note: Refer to the handout for a complete explanation and layout of the file entitled AUTODATA.TXT) CAR MODEL is a 12 character string CYLINDERS is an integer DOORS is an integer COLOR is an integer STICKER PRICE is a floating point decimal MONTH is an integer YEAR is an integer AMOUNT CUSTOMER PAID is a floating point decimal LENDING INSTITUTION is an integer SALESPERSON'S NUMBER is an integer We will go over the necessary code for "disk processing" in class.FORMULAS: In addition to your input data, there are several "formulas" that you must include in your source code to produce the "Summary Report". They all deal with the accumulation of "totals" to be used in the program. DEALER COST = STICKER PRICE X 74% SINGLE CAR PROFIT = AMOUNT CUSTOMER PAID - DEALER COST TOTAL DEALER PROFIT = TOTAL DEALER PROFIT + SINGLE CAR PROFIT CONSTRAINTS: As in program # 3, after you open your input file, you will need to test to make certain that the data is on drive A: (or your current drive) and that the name of the file is spelled correctly. If the file can not be found, display a message that states "There is a problem locating the input file". More importantly "exit" the program- do not go on since executing your program without data makes no sense!!CIS-1130 ("C")Program # 4 - pg. 3OUTPUT: Listed below is a sample of what your output may look like after you execute (run) your program. PGCC FORD DEALERSHIP 2008 3rd QUARTER STATISTICS REPORT PREPARED BY: PUT YOUR NAME HERE MODEL COLOR MSRP MONTH SOLD DEALER PROFIT ---------- ---------- -------- ----------- ------- ----------- ----------- XXXXXXXXXXXX XXXXXX nnnnn.nn XXXXXXXXX nnnnn.nn “ “ “ “ “ “ “ “ “ “ “ “ “ “ “ XXXXXXXXXXXX XXXXXX nnnnn.nn XXXXXXXXX nnnnn.nn TOTAL DEALER PROFIT FOR THE 3rd QUARTER OF 2008 :


View Full Document

PGCC CIS 1130 - Introduction to Programming Logic

Documents in this Course
Load more
Download Introduction to Programming Logic
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Introduction to Programming Logic and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Introduction to Programming Logic 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?