943,739 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 555
  • VB.NET RSS
Mar 6th, 2008
0

Help Needed desperately! using 2005

Expand Post »
Hey, I've never done any programming in my life and would greatly appreciate some help
I have to create a windows application where there are 3 text boxes in which you enter assignment scores (numerical) and then click on a button that adds the 3 scores together and displays the total in a label on the same application. When you click the button it also has to give a grade in another label underneath the 'totalscorelabel', such as 'High distinction' if the scores above 20 or so.... I know the second part uses an ifstatement except im not quite sure how to use them...

Thank you so much for any help!
Attached Images
File Type: bmp untitled.bmp (202.7 KB, 17 views)
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ferrier18 is offline Offline
5 posts
since Mar 2008
Mar 7th, 2008
0

Re: Help Needed desperately! using 2005

specify more your problem and condition :
- you didn't give a condition for the result. how the result can show "High Distinction" (<20) or other result (> 20 = "?", > 50 = "?" ).
- how far you was tried??
"We only give homework help to those who show effort"
try to write code with this pseudo code :
VB.NET Syntax (Toggle Plain Text)
  1. on button click event
  2. pseudo code :
  3. labelTotal = val(text1.text) + val(text2.text) + val(text3.text)
  4. if labelTotal.text < 20 then
  5. Result.text = "High Distinction"
  6. else if labelTotal.text > 20 and labelTotal < ??? then
  7. Result.text = "????"
  8. .... etc..etc
  9. End if
  10. end of button event

i know you can do this Friend
Last edited by Jx_Man; Mar 7th, 2008 at 7:46 am.
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007
Mar 7th, 2008
0

Re: Help Needed desperately! using 2005

Click to Expand / Collapse  Quote originally posted by ferrier18 ...
Hey, I've never done any programming in my life and would greatly appreciate some help
I have to create a windows application where there are 3 text boxes in which you enter assignment scores (numerical) and then click on a button that adds the 3 scores together and displays the total in a label on the same application. When you click the button it also has to give a grade in another label underneath the 'totalscorelabel', such as 'High distinction' if the scores above 20 or so.... I know the second part uses an ifstatement except im not quite sure how to use them...

Thank you so much for any help!
Hey Guys, Sorry for not being very specific... I figured out the addition code just before your post Jx_Man...But thank you still. I had it almost right, i just didn't have 'val' before each textbox... I'm having trouble with the If statements because theres multiple conditions:
Fail:
Awarded to any student who scores either
-a total score less than 15
- less than 5 in two or more assignments
o High Distinction:
Awarded to any student who has both
- A total score greater or equal to than 23
-Not scored less than 5 in any assignment
o Pass:
- Anyone who has not scored a Fail or High Distinction

Heres what i have in my disasterous If Statement:

NOTE: label6 = Total Label7 = Result

If Label6.Text >= 23 And TextBox1.Text Or TextBox2.Text Or TextBox3.Text = 5< Then Label7.Text = "High Distinction"
Else If Label6.Text 15< Or 'Less than five in two assignments --> Have no idea!!!'
Then Label7.Text = "Fail"
Else If Label7.Text = "Pass"
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ferrier18 is offline Offline
5 posts
since Mar 2008
Mar 8th, 2008
0

Re: Help Needed desperately! using 2005

Quote ...
Fail:
Awarded to any student who scores either
-a total score less than 15
- less than 5 in two or more assignments
o High Distinction:
Awarded to any student who has both
- A total score greater or equal to than 23
- Not scored less than 5 in any assignment
o Pass:
- Anyone who has not scored a Fail or High Distinction
i confused with your if statment !!!
this a condition if not wrong :
* Fail
- TotalScore < 15
- (Ass1 + Ass2) < 5 or (Ass1 + Ass3) < 5 or (Ass2 + Ass3) < 5 or (Ass1 + Ass2 + Ass3) < 5

* High Distinction
- TotalScore > 23 --> it could be 24,70, 100 or greater
- Ass1 or Ass2 or Ass3 > 5

* Pass
- Anyone who has not scored a Fail or High Distinction???
how it could be??not scored a Fail or High Distinction??
- in condition of High Distinction, TotalScore > 23 (-> 24, 50, 70, 100 ... and greater than 23) so what a condition for pass? whether who get HighCondition is pass?
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,138 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: SHA-256 in .NET
Next Thread in VB.NET Forum Timeline: Identical items vb 2005





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC