0 Replies - 447 Views - Last Post: 21 October 2013 - 03:58 PM Rate Topic: -----

#1 Kegor  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 21-October 13

I'm not sure on how to use classes correctly! Example inside.

Posted 21 October 2013 - 03:58 PM

Hello all,

I recently took up a computing course at college and we're using VB as our language. As my college is off this week, I thought I'd try to practice some VB and improve my skills in. I was recently browsing this sight for some idea's of programs I could create and found this one:

  • Student Grade Book Application – Keep track of students (with a student class that has their name, average, and scores) in a class and their grades. Assign their scores on tests and assignments to the students and figure out their average and grade for the class. For added complexity put the students on a bell curve.

Now all I have done so far is a simple login screen so that Students can access their area and see their grade, while Teachers can log onto their area to add grades, or add users. Now since the task asks me to use a class to store this information in, I learnt how to create them and currently have them storing name, username, yeagroup and average grade. However I'm not sure how to add this for multiple students. For example I have a student called Jim and an other called Jack, now to store these names I'm currently using a structure which gets all the information from a text file and I'm trying to make that go into the student class.

Dim student1 As New Student

student1.name = loginDetails(index).name
student1.username = loginDetails(index).username
student1.yearGroup = loginDetails(index).yearGroup

This is as far as I get before I just can't understand anything anymore. Like, what if I have more than one student, do I need to do student2 as new Student, etc. Or Should I remove the text file and structure.

I've been trying to figure this out for a while and I'm just boggled. Any advice on classes, how they work, how to use them etc. Or a solution to help me on my problem would be amazing. Please bear in mind I have been programming for less than 4 weeks so I'm a beginner. Thanks again.

Is This A Good Question/Topic? 0
  • +

Page 1 of 1