CIS-111          INTRODUCTION TO PROGRAMMING LOGIC        Semester/Year
                        USING THE C LANGUAGE

PROJECT #1

Due: 12 October 1998

Concepts include the use of a simple loop, interactive data entry and a short summary report. 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.

After you have entered your source code, compile it to make certain there are no syntax errors. 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 entered from the keyboard, you must use the input data given to you in class. There are three(3) records that you must process.

After you have executed (run) your program, you need to hand in the following items:

  1. a listing of your source code
  2. the results of your program
  3. pseudocode or a program flowchart, as program header block comments.
  4. PROGRAM SPECIFICATIONS

    INPUT:

    The INPUT RECORD layout for Project # 1 is listed below. Each record has three(3) fields:
         CAR MODEL          STICKER PRICE       AMOUNT CUSTOMER PAID
    
          Mustang              12540                   11258
          Escort               10380                    9650
          Probe                15470                   13565
    
    Since the data is entered via the keyboard, you will need to include several "user prompts" before you enter in each field of data. This program allows the user to enter in information about each automobile from the keyboard as the program executes a simple "loop".

    Listed below is a sample of what your screen may look like as you execute (run) your program:

    
                 UMBC FORD DEALERSHIP WEEKLY INVENTORY
                 SALESPERSON:   PUT YOUR NAME HERE
    
         Please Enter Model Sold:              Mustang     
         Please Enter Sticker Price:           12540
         Please Enter what the Customer Paid:  11258   
              
         Was There Another Car Sold Today -- Answer (y or n):  y
         
         Please Enter Model Sold:              Escort      
         Please Enter Sticker Price:           10380
         Please Enter what the Customer Paid:  9650
       
         Was There Another Car Sold Today -- Answer (y or n):  y
         
         Please Enter Model Sold:              Probe       
         Please Enter Sticker Price:           15470
         Please Enter what the Customer Paid:  13565
       
         Was There Another Car Sold Today -- Answer (y or n):  n
    

    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 are as follows:
       DEALER COST         =   STICKER PRICE   X  79%
       SINGLE CAR PROFIT   =   AMOUNT CUSTOMER PAID  -  DEALER COST
    
       TOTAL NUMBER OF CARS SOLD  =  TOTAL  NUMBER OF CARS SOLD + 1
       TOTAL DEALER PROFIT        =  TOTAL DEALER PROFIT + SINGLE CAR PROFIT
    

    OUTPUT:

    After you have processed all three (3) input records, put out a small summary report that includes a header, the number of cars sold by you this week and the profit the UMBC Ford Dealership made from your transactions.

    A sample of the report portion of your output is listed below.

                             REPORT SUMMARY
    
          NUMBER OF CARS SOLD THIS WEEK BY (PUT YOUR NAME HERE):  n
    
          UMBC FORD DEALERSHIP PROFIT:                            $ nnnn.nn
    

    Standards

    Make sure you follow the standards required for this course! I have listed them on my homepage for quick reference.


    Last Modified: Monday, 05-Oct-1998 15:15:52 EDT
    Monday, 05-Oct-1998 15:15:52 EDT