1. Design an object oriented representation (class) to model a student record at a university which contains the following properties/fields per student object:
a. Student ID number (a long number e.g. 263712036)
b. Student name (stored separately as firstname and lastname) (a text string e.g. “Dave Smith”)
c. Date of birth (stored as a string e.g. 12/06/1993)
d. Course enrolled on (course code as a string e.g. BSCWD)
e. Contact number (a string e.g. 07766383726)
f. List of average marks for each of three years of study (e.g. 59.8, 61.3, 63.4) – any empty marks would imply that the student had not completed a year yet
g. Link to a picture of the student (a text string representing a file path e.g. “c:\data\263712036.jpg”
2. Create a set of constructor methods which allow these properties to be passed when the new keyword is used to create a student record object or setter/getter properties which allow the properties/fields to be accessed.
3. Create special public methods to return the following:
a. String GetEmail() which returns the full email address as a string (firstname + . + lastname + “@edu.salford.ac.uk”)
b. Float GetFinalGrade() Final degree grade (based on 0.25 * 2nd year mark + 0.75 * 3rd year mark – marks used in the calculation are from the list of three average marks stored in the object (point f. above)
************Object oriented student records system *************$$$HELP$$$ Watch
- Thread Starter
- 18-08-2016 17:37
- 18-08-2016 21:28
Google is your friend.
I typed "Java class" but you can substitute Java for whatever language you are using. Here is one page
Here is a page on constructors in C# (very similar to Java)
You probably need to know about a Date type (I typed Java date)
So once you have read that lot, and assuming you went to the original class / lecture, you should be able to polish off your question in less than 30 minutes easily.