Announcement

Collapse
No announcement yet.

Anyone want to test my program?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyone want to test my program?

    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.

    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!
    How'd I get so white and nerdy?

  • #2
    Re: Anyone want to test my program?

    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

    Comment


    • #3
      Re: Anyone want to test my program?

      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

      Comment


      • #4
        Re: Anyone want to test my program?

        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.
        How'd I get so white and nerdy?

        Comment

        Working...
        X