Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Homework HELP PLZ!!! Due soon. :)
Closed Thread
Old 09-16-2007, 10:40 PM   #1 (permalink)
 
Ultra Techie

Join Date: Mar 2005

Posts: 591

AuThoRitY is on a distinguished road

Send a message via AIM to AuThoRitY
Default Homework HELP PLZ!!! Due soon. :)

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
__________________
Really need to build a new rig.
AuThoRitY is offline  
Old 10-03-2007, 08:54 AM   #2 (permalink)
forrestcupp's Avatar
 
Ultra Techie

Join Date: Feb 2007

Posts: 588

forrestcupp is on a distinguished road

Default Re: Homework HELP PLZ!!! Due soon. :)

Well, people don't like to do other people's homework for them. But maybe I can tell you what you did wrong without telling you how to fix it.

Your program only outputs the final result. Your teacher wants you to output all of the info that you used to get the results, too. Go back and reread your assignment, and you'll see what I'm talking about.
forrestcupp is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On