Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Visual Basic Homework Help  (Read 1019 times)

toradrow777

  • Bay Watcher
    • View Profile
Visual Basic Homework Help
« on: September 12, 2013, 03:43:55 pm »

I need help figuring out the code that I need for this assignment, everything else I can do but I need help with the code.

Your first assignment in this course is to create a Visual Basic program to calculate grades.

There will be four categories of grades:
- Test scores
- Lab scores
- Quizzes
- Final Exam

First, the user will determine the % each of the above categories count toward the overall grade. You will need to tell the user how you would like this data entered. Note that all percentages should add up to 100%.

The user will then determine the maximum value earned for each category. Some users may have everything on a 100 point scale, but some may not.

The user will enter the following grades:

- (3) Test Scores
- (5) Lab Scores
- (4) Quiz Scores
- (1) Final Exam Grade

You may assume that the user will not exceed the maximum value for the category (we will deal with this in a later chapter).

Once all of the data is entered, you will calculate the final average (on a 100 point scale) and assign a final letter grade on a 10 point grading scale (90-100 is an A, 80-89.99 is a B, etc.).
Logged

timotheus

  • Bay Watcher
  • New to Dwarf Fortress.. Long time ASCII gamer..
    • View Profile
    • Home
Re: Visual Basic Homework Help
« Reply #1 on: September 12, 2013, 04:48:37 pm »

Considering the code is the most important part of, well, coding.. it wouldn't help you to just give you the code you need.

Why don't you post up the code you've been working on so far for the assignment?
Logged
twitter: @timotheus
email: tim@hithlonde.com
xmpp: tim@hithlonde.com

toradrow777

  • Bay Watcher
    • View Profile
Re: Visual Basic Homework Help
« Reply #2 on: September 12, 2013, 05:59:40 pm »

Considering the code is the most important part of, well, coding.. it wouldn't help you to just give you the code you need.

Why don't you post up the code you've been working on so far for the assignment?

Which is the biggest problem here: I don't even have a code, and I don't even know how to start the code.  I'm having enough trouble with the project layout to care about the code right now so if someone could help get me started (not asking to do it all for me, but that would be nice) then I could work things out from there.

Okay, I've managed to code the exit button, so there's that, and I laid out the form itself and labeled everything appropriately, now all I need is the code.

The following things need to be coded: testScorePercentageBox, labScorePercentageBox, quizScorePercentageBox, finalExamPercentageBox, testScore1Box, testScore2Box, testScore3Box, labScore1Box, labScore2Box, labScore3Box, labScore4Box, labScore5Box, quizScore1Box, quizScore2Box, quizScore3Box, quizScore4Box, finalExamScoreBox, finalAverageLabel, letterGradeLabel, clearButton, and calculateButton.

I may not be able to remember how to code all of this right now, but I have an idea of what I want to do.  The clearButton is to empty the boxes and the calculateButton will run the calculations and give me my final average and letter grade (which, needless to say, fill in the finalAverageLabel and letterGradeLabel respectively).  For the final average I need to add up the grades by category and multiply by the number in the respective PercentageBox (e.g: add up the 3 test score boxes and multiply them by the testScorePercentageBox), then I need to add up the resulting numbers and divide by 4, giving me my final average (which should hopefully be in between 0 and 100).  Now, how do I start about coding that?
« Last Edit: September 12, 2013, 07:07:42 pm by toradrow777 »
Logged

Tellemurius

  • Bay Watcher
  • Positively insane Tech Thaumaturgist
    • View Profile
Re: Visual Basic Homework Help
« Reply #3 on: September 12, 2013, 06:46:54 pm »

first start off building the algorithm to calculate the grade, define variables for their use.