CIS 115 – Introduction to Programming
Project 1
Educational Purpose: To become familiar with elementary uses of INPUT, PRINT, LET, END, CLS, REM statements in QBasic.
Write a program in QBasic to calculate the total amount a college student owes for the semester and print a report indicating the breakdown of the total.
Input
- Name of student
- Total credit hours being taken for the semester
Output
- Heading
- Name of student
- Total credit hours being taken for the semester
- Total amount of tuition due (based on $62.00 per hour)
- Total amount of lab fees due (based on $1.50 per hour)
- Registration fee (flat fee of $10.00)
- Total amount due (sum of total amount of tuition, total amount of lab fees, and the registration fee)
- Print and ending message at the end of the report.
Processing
Using the above inputs, perform the necessary calculations to determine total amount of tuition due, total amount of lab fees, and total amount due. Format report on the screen as indicated in the sample below. Bold face indicates the prompt message the user will see. Italics indicate the user’s response. The remainder is the report.
ENTER YOUR NAME JOE WAUBONSEE
ENTER TOTAL CREDIT HOURS 12
TUITION REPORT
STUDENT JOE WAUBONSEE
TOTAL CREDIT HOURS 12
TOTAL TUITION 744
TOTAL LAB FEES 18
REGISTRATION FEE 10
TOTAL AMOUNT DUE 772
END OF REPORT
This example was for a student with 12 credit hours. Also try 10 credit hours and 15 credit hours.
THAT IS WHAT IM SUPPOSED TO BE DOING AND HERE IS MY CODE SHE SAID SOMETHING ISNT DISPLAYING LIKE THE SUB BREAK DOWN OF IT IN THE RESULT.
REM PROGRAM AUTHOR: LUKE STROTHMAN
REM ASSIGNMENT: PROJECT 1
REM VARIABLES USED:
REM STUDENT$ - NAME OF STUDENT
REM TOTAL.CREDIT.HOURS - AMOUNT OF CREDIT HOURS USED
REM TOTAL.LAB.FEES - LAB FEES
REM TUITION.PER.HOUR - AMOUNT PER HOUR OF TUITION
REM REGISTRATION.FEE - FEES FOR REGISTRATION
REM TOTAL.AMOUNT.DUE - SUM OF ALL FEES
REM THIS PROGRAM CALCULATES TOTAL COSTS PER SEMESTER FOR STUDENTS
REM
REM INITIALIZE VARIABLES
LET TOTAL.LAB.FEES = 1.5
LET TUITION.PER.HOUR = 62
LET REGISTRATION.FEE = 10
REM CLEAR SCREEN AND DISPLAY HEADING
CLS
PRINT TAB(20); "SEMESTER COST CALCULATION PROGRAM"
PRINT
REM INPUT DATA
INPUT "NAME OF STUDENT ", STUDENT$
INPUT "NUMBER OF CREDIT HOURS", TOTAL.CREDIT.HOURS
REM CALCULATE CHARGE
LET CHARGE = TOTAL.CREDIT.HOURS * TOTAL.LAB.FEES + TOTAL.CREDIT.HOURS * TUITION.PER.HOUR + REGISTRATION.FEE
REM DISPLAY RESULT
PRINT "TOTAL COST TO "; STUDENT$; " $"; CHARGE
REM TERMINATE PROGRAM
END
THAT IS MY CURRENT CODE I AM USING QBASIC! Any help would be awesome. Thanks