PLEASE...Need help with homework due in 20min! :(..Stealthtools

Page 1 of 1

9 Replies - 1178 Views - Last Post: 18 March 2008 - 10:07 PMRate Topic: //<![CDATA[ rating = new ipb.rating( 'topic_rate_', { url: 'http://www.dreamincode.net/forums/index.php?app=forums&module=ajax&section=topics&do=rateTopic&t=46614&amp;s=99eb8b7d69ac3c05a4d9484f4f8b96ed&md5check=' + ipb.vars['secure_hash'], cur_rating: 0, rated: 0, allow_rate: 0, multi_rate: 1, show_rate_text: true } ); //]]>

#1 StealthTools

Reputation: 1
• Posts: 52
• Joined: 11-March 08

PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 12:38 PM

About what I need help doing:

Use QBasic to write a program that correctly calculates the quantity of supplies needed for Ms. Bergman's art class. The program sould prompt the user to enter the name of each project and the number of students making the project. Output should include the quantity of each type of supply. Three SUB procedures should be used as follows:

1. SUB procedure to get data from the user.

2. SUB procedure to calculate supply quantities.

3. SUB procedure to display quantities.

Ms. Bergmans, City Heigh's art teacher would like a program to determine the quantity of supplies she needs for an art class. Each student is required to make one of three projects.

Ceramic Vase

Water Color

Charcoal Sketches

INPUT:

Prompt the user to enter the name of each project and the number of students making that project.

PROCESSING:

a. Calculate the amount of each type of material needed based on the following table:

Project Supplies

Ceramic Vase 0.5 pounds of clay
5 ounces of glaze
1 brush

Water Color 1 box water colors
1 canvas
1 brush

Charcoal Sketches 4 pieces of charcoal
8 pieces of newsprint

OUTPUT:

The quantity of each type of supply should then be displayed in a table similar to the following:

Art Supplies
Clay: 4 pounds
Glaze: 40 ounces
Brushes: 25
Canvases: 17
Water Colors: 17 boxes
Charcoal: 48 pieces
Newsprint: 96 sheets

This is what I have so far.. It is not finished and is probably not even close to how it needs to be..

What confuses me is getting the user of this program to enter the name of the project and somehow the name of the project entered automatically means the supplies of the project entered.

Due in a couple hours: HELP PLEASE!, Thanks

I am also online on Windows Live Messenger: Stealth_Tools@Hotmail.com

DECLARE SUB CalculateSupplies (Clay, Glaze, Brushes, Canvases, WaterColors, Charcoal, Newsprint)
DECLARE SUB GetData (ProjectVase, ProjectColor, ProjectSketches, NumberStudentVase, NumberStudentColor, NumberStudentSketches)
DECLARE SUB DisplayInfo (NumberStudentVase, NumberStudentColor, NumberStudentSketches)

'*** Art Supplies Calculator ***

'*** This program will calculate the amount ***
'*** of art supplies needed for a classroom ***
'*** based on the name of the project and ***
'*** the number of students making that ***
'*** project. ***

CLS

'*** CALL GetData to prompt the user to enter needed data. ***

CALL GetData(ProjectName, NumberStudent)

'*** CALL CalculateSupplies to determine amount of supplies. ***

CALL CalculateSupplies(Clay, Glaze, Brushes, Canvases, WaterColors, Charcoal, Newsprint)

'*** CALL DisplayInfo to display the amount of supplies. ***

CALL DisplayInfo(NumberStudentVase, NumberStudentColor, NumberStudentSketches)

END

SUB GetData (ProjectVase, ProjectColor, ProjectSketches, NumberStudentVase, NumberStudentColor, NumberStudentSketches)

'*** This procedure prompts the user to enter needed data. ***

CLS
PRINT
PRINT "Projects: Ceramicvase, Watercolor, Charcoalsketches"
PRINT
INPUT "Enter the name of project 1: ", Ceramicvase
PRINT
INPUT "Enter the number of students in project 1: ", NumberStudentVase
PRINT
INPUT "Enter the name of project 2: ", Watercolor
PRINT
INPUT "Enter the number of students in project 2: ", NumberStudentColor
PRINT
INPUT "Enter the name of project 3: ", Charcoalsketches
PRINT
INPUT "Enter the number of students in project 3: ", NumberStudentSketches
PRINT

END SUB

SUB CalculateSupplies (Clay, Glaze, Brushes, Canvases, WaterColors, Charcoal, Newsprint)

'*** This procedure calculates the amount of supplies needed for the projects. ***

Ceramicvase = (VBrush, Clay, Glaze) * NumberStudentVase

Watercolor = (Wcolors, Canvas, CBrush) * NumberStudentColor

Charcoalsketches = (Charcoal, Newsprint) * NumberStudentSketches

END SUB

SUB DisplayInfo (NumberStudentVase, NumberStudentColor, NumberStudentSketches)

'*** This procedure displays the amount of supplies needed for the projects. ***

CLS

PRINT TAB(15) "Art Supplies"
PRINT
PRINT " Clay:" TAB(20),
PRINT " Glaze:" TAB(20),
PRINT " Brushes:" TAB(20),
PRINT " Canvases:" TAB(20),
PRINT " Water Colors:" TAB(20),
PRINT " Charcoal:" TAB(20),
PRINT " Newsprint:" TAB(20),
PRINT

END SUB

This post has been edited by StealthTools: 18 March 2008 - 03:20 PM

Is This A Good Question/Topic? 0

Replies To: PLEASE...Need help with homework due in 20min! :(..Stealthtools

#2 StealthTools

Reputation: 1
• Posts: 52
• Joined: 11-March 08

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 12:45 PM

I couldn't figure it out... it was more abstract than anything I have done so far.

Suprised that no one posted anything in such a long time of this thread being open....

No one even posted to give a suggestion or atleast try to help... last time I got lots of feedback... now nothing... I know NYCK couldn't help due to a meeting and he is one of the best.

This post has been edited by StealthTools: 18 March 2008 - 04:11 PM

#3 Nykc

• Gentleman of Leisure

Reputation: 736
• Posts: 8,646
• Joined: 14-September 07

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 08:08 PM

Try to get your questions out there a little earlier than two hours before they are due. If you really want to increase your odds of getting help, I recommend working on next weeks assignment as soon as possible. Better to be finished early than get a failing grade....

To be honest this problem would have taken me some time to tackle. There are several ways to approach it, one would be to create variables for the supplies.

```Clay = 4
Glaze = 40
etc...

'****************

This would work with this.

Ceramicvase = (VBrush, Clay, Glaze) * NumberStudentVase

```

This post has been edited by Nykc: 18 March 2008 - 08:09 PM

#4 skyhawk133

Reputation: 1900
• Posts: 20,332
• Joined: 17-March 01

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 08:11 PM

Oooof. 7 minutes between original post and a "surprised nobody helped"

Yeh. You're gonna have to give people a LITTLE more time to help you next time.

#5 capty99

• i am colt mccoy

Reputation: 98
• Posts: 10,081
• Joined: 26-April 01

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 08:32 PM

8 minutes.

#6 Nykc

• Gentleman of Leisure

Reputation: 736
• Posts: 8,646
• Joined: 14-September 07

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 08:56 PM

Was edited at 7:11pm

This post has been edited by Nykc: 18 March 2008 - 08:57 PM

#7 capty99

• i am colt mccoy

Reputation: 98
• Posts: 10,081
• Joined: 26-April 01

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 09:34 PM

6:11. cst bitches.

#8 no2pencil

• Professor Snuggly Pants

Reputation: 5963
• Posts: 29,137
• Joined: 10-May 07

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 09:42 PM

QBAISC?!

#9 Martyr2

• Programming Theoretician

Reputation: 4864
• Posts: 13,181
• Joined: 18-April 07

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 10:04 PM

I must say this is kinda funny. Stealth you have to give us more time than that man, 20 minutes is ridiculous! Why are you waiting so long before deadline? Half the time when you give us enough time we help you do most of the project. You saw how fast Nykc and myself had to throw out the posts to make sure you could make your last deadline and that was 2 hours before.

You have to realize that when people see that an assignment is due in 20 they know it is going to take longer than that to help so they don't even bother. The sooner you can get on here with your problem (aka sooner you start) the more time we have to help you out and clarify what you don't understand. Then you will be done with plenty of time to spare.

This post has been edited by Martyr2: 18 March 2008 - 10:04 PM

#10 capty99

• i am colt mccoy

Reputation: 98
• Posts: 10,081
• Joined: 26-April 01

Re: PLEASE...Need help with homework due in 20min! :(..Stealthtools

Posted 18 March 2008 - 10:07 PM

to be fair :
he originally posted, then came back and made the edits, i believe the 20 minutes was a part of the edit... he provided a couple hours, more than 20 minutes but still not enough.

This post has been edited by capty99: 18 March 2008 - 10:07 PM