-
April 5th, 2013, 11:04 AM
#1
Homework Help!! Please!!
I am so lost in this class. I just need to get past my last two assignments in this class and I don't have to worry about VB again. I am going to school for web development/Admin.
Please help me, I don't even know how to start this code off. Any help would be greatly appreciated!! Here is the assignment....
Purpose: The purpose of this assignment is to use sub procedures.
Write a Visual Basic program that calculates the cans of paint required to cover a room.
Each can of paint covers 500 square feet of surface area.
Your form should have enough text boxes to calculate the area of 4 walls. Your form should also have a calculate button, a clear button and an exit button. It is required that your calculations use a sub procedure to determine the number of paint cans needed. This sub procedure should be called from the calc button. There must be data passed to the sub procedure with parameters. Note that you should move the data from the text boxes to variables. You should then do calculations using variables. You then take the data from the variables and display it on the form in labels.
I know this is a piece of cake for you boys, but this class makes me feel like an idiot. I am barely passing
Thank you boys!!!
-
April 5th, 2013, 11:29 AM
#2
Re: Homework Help!! Please!!
It is the quote from Announcements you should have already read:
A special note about Homework
We have an FAQ about homework questions. If your question is related to a homework assignment, then read this FAQ. It will help you, help yourself!
Victor Nijegorodov
-
April 5th, 2013, 11:54 AM
#3
Re: Homework Help!! Please!!
That did not help VictorN. But thanks sweetie.
-
April 5th, 2013, 11:59 AM
#4
Re: Homework Help!! Please!!
You have to show what you have already done and what problem you currently have that prevent you to go on.
Only after that you could expect some additional help.
Victor Nijegorodov
-
April 5th, 2013, 12:10 PM
#5
Re: Homework Help!! Please!!
Public Class Form1
Public Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
wall1HT.Clear()
wall1LT.Clear()
wall2HT.Clear()
wall2LT.Clear()
wall3HT.Clear()
wall3LT.Clear()
wall4HT.Clear()
wall4LT.Clear()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim wall1HT As Integer = 0
Dim wall1LT As Integer = 0
Dim wall2HT As Integer = 0
Dim wall2LT As Integer = 0
Dim wall3HT As Integer = 0
Dim wall3LT As Integer = 0
Dim wall4HT As Integer = 0
Dim wall4LT As Integer = 0
Dim wall1Total As Integer = 0
Dim wall2Total As Integer = 0
Dim wall3Total As Integer = 0
Dim wall4Total As Integer = 0
Dim paintCans As Single
wall1Total = wall1HT * wall1LT
wall2Total = wall2HT * wall2LT
wall3Total = wall3HT * wall2LT
wall4Total = wall4HT * wall4LT
paintCans = wall1Total + wall2Total + wall3Total + wall4Total
For paintCans = 0 To 1000 Step 1
If paintCans <= 500 Then
paintCans = 1
Else
For paintCans = 501 To 1000 Step 1
Next
End If
Next
paintCans = ansLBL.Text
End Sub
End Class
I am really bad at this. I know this is completely wrong in every aspect. Please dont be mad that i am butchering your language.
-
April 5th, 2013, 12:29 PM
#6
Re: Homework Help!! Please!!
- You have to use Code tags while posting code snippets. Otherwise your code is unreadable.
- What problem with this code (and where) do you have?
Victor Nijegorodov
-
April 5th, 2013, 12:57 PM
#7
Re: Homework Help!! Please!!
Also
She should post in VB.Net forum
JG
... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|