View Full Version : Anyone want to test my program?
adrian
October 3rd, 2005, 07:09 PM
I just spent the last few hours trying to make a program from scratch, and common sense basically stopped me from completing it in a couple of hours. Its supposed to be a practice assignment for the finals on Wednesday, and I'm so dumbfounded that all I had to do was change a few things, that I don't want to test it.
Its a Mckinley Car Wash program, so its kind of useful (I don't know if the prices are updated. If they aren't, then I can update them)
For those of you who want to test it, then go ahead (http://rapidshare.de/files/5852274/SampleFinalExam.exe.html).
This was done in Visual Basic, and for you skeptics, no there isn't any viruses (I scanned it with NOD32, and I made it myself, so being an amatuer programmer, I don't do that stuff)
Comments are appreciated!
arturo_h
October 3rd, 2005, 09:55 PM
One of your 'if' statements after pressing the 'submit' button should be:
if (txtService.Text != "Basic" && txtService.Text != Special)
{
//error statement
}
else
{
if (txtService.Text == "Basic" || txtService.Text == "basic")
{
//calculate basic service
}
else if (txtService.Text == "Special" || txtService.Text == "special")
{
//calculate special service
}
}
I can enter something like "hello" in the "service" text box and I won't receive an error and the subtotal, tax and total fields all come out $0.00. Also it shows your if statements under the 'Code Hints' button comparing the text in the textbox with "basic" but you should also check for "Basic" (with a capital B) and same for "special" / "Special".
I'd like to say excellent layout though. It drives me nuts when people program something and the User Interface is completely out of wack, but yours is very organized. I like that.
Arturo
arturo_h
October 3rd, 2005, 10:02 PM
Oh, and sorry my code is probably in C#, cause that's what I've been working with lately. It's been a while since I've messed around with VB, but:
&& = "And"
|| = "Or"
So it should read:
If (txtService.Text <> 'Basic' And txtService.Text <> 'Special' And
txtService.Text <> 'basic' And txtService.Text <> 'special') Then
'error statement
Else
If (txtService.Text = 'Basic' Or txtService.Text = 'basic') Then
//calculate basic service
ElseIf (txtService.Text = 'Special' Or txtService.Text = 'special') Then
//calculate special service
Sorry about that,
Arturo
adrian
October 4th, 2005, 08:41 AM
I only had to do the things under the submit button; my teacher did the rest of the coding.
I'll try them out when I have the time.
vBulletin® v3.7.0, Copyright ©2000-2008, Jelsoft Enterprises Ltd.