Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
1.50/5 (2 votes)
See more:
hi to all...

i want to develop a project for a college but i have problem , that how to develop a class model ( object oriented model)..... i have a good idea about the coding in C# . but newer to such like project....

i have develop a project for online shop ......
Posted
Comments
Richard MacCutchan 11-Dec-11 8:58am    
Do you have a question?
OriginalGriff 11-Dec-11 9:00am    
What have you tried? How far did you get? Where are you stuck?
Muhammad Tufail 1979 22-Dec-11 7:54am    
public class Student : Person
{

private int rollNo;
private string fatherName;
private Session session; // it will be like this 2011-2012 etc....
private string yearOfExam;
private StudentDetail detail;
private SubjectCombination subjectCombination;
private Group group;
private DateTime dateOfAdmission;



public Student()
{

}

public Student(int rNo, string name, DateTime DOB, DateTime date_of_Enrolled)
: base(name)
{
RollNo = rNo;
DateOfBirth = DOB;
DateOfAdmission = date_of_Enrolled;

}



public int RollNo
{
get
{
return rollNo;
}
set
{
this.rollNo = value;
}
}

public string FatherName
{
get
{
return fatherName;
}
set
{
this.fatherName = value;
}
}
public Session Session
{
set
{
this.session = value;
}
get
{
return this.session;
}
}
public string YearOFExam
{
set
{
this.yearOfExam = value;
}
get
{
return yearOfExam;
}
}
public StudentDetail Detail
{
set
{
this.detail = value;
}
get
{
return this.detail;
}
}
public SubjectCombination SubjectCombination
{
set
{
this.subjectCombination = value;
}
get
{
return subjectCombination;
}
}
public Group Group
{
set
{
this.group = value;
}
get
{
return this.group;
}
}

public DateTime DateOfAdmission
{
get
{
return dateOfAdmission;
}
set
{
dateOfAdmission = value;
}
}


}
Muhammad Tufail 1979 22-Dec-11 7:55am    
public class StudentDetail
{
private GroupNameEnum degreeTitle;
private string sessionyear;
private string reg_No;
private int marksObtained;
private int totalMarks;
private string remarks; // promoted , dropped , admitted..etc

public StudentDetail()
{
}

public StudentDetail(GroupNameEnum degTitle, string year, string about)
{
DegreeTitle = degTitle;
SessionYear = year;
Remarks = about;
}

public GroupNameEnum DegreeTitle
{
set
{
degreeTitle = value;
}
get
{
return degreeTitle;
}

}
public string SessionYear
{
set
{
sessionyear = value;
}
get
{
return sessionyear;
}
}
public string Reg_NO
{
set
{
reg_No = value;
}
get
{
return reg_No;
}

}
public int MarksObtained
{
set
{
marksObtained =value;
}
get
{
return marksObtained;
}
}
public int TotalMarks
{
set
{
totalMarks = value;
}
get
{
return totalMarks;
}

}
public string Remarks
{
set
{
remarks = value;
}
get
{
return remarks;
}
}
Muhammad Tufail 1979 22-Dec-11 7:59am    
public class Teacher : Person
{
private int personalNumber ;
private long cnic;
private int salary;
private short result;
private string remarks;
private Subject teachingSubject;
private List<group> groups;
private DateTime dateOfJoining;
private DateTime dateOfReleave;
private string qualification;
private string scale;

public Teacher()
{
}


public Teacher(int pNo, string name, long cNIC, DateTime DOB, DateTime joiningDate, Subject sub, string qual)
:base (name)

{
PersonalNumber = pNo;
CNIC = cNIC;
DateOfBirth = DOB;
dateOfJoining = joiningDate;
Qualification = qual;

}





// Properties.......///


public int PersonalNumber
{
set
{
personalNumber = value;
}
get
{
return personalNumber;
}
}
public long CNIC
{
set
{
this.cnic = value;
}
get
{
return cnic;
}
}
public int Salary
{
set
{
salary = value;
}
get
{
return salary;
}
}
public short Result
{
set
{
result = value;
}
get
{
return result;
}
}
public string Remarks
{
set
{
remarks = value;
}
get
{
return remarks;
}
}
public Subject TeachingSubject
{
set
{
this.teachingSubject = value;
}
get
{
return this.teachingSubject ;
}

}
public List<group> Groups
{
set
{
groups = value;
}
get
{
return this.groups;
}
}
public DateTime DateOfJoining
{
set
{
dateOfJoining = value;
}
get
{
return dateOfJoining;
}
}
public DateTime DateOfReleave
{
set
{
dateOfReleave = value;
}
get
{
return dateOfReleave;
}
}
public string Qualification
{
set
{
qualification = value;
}
get
{
return qualification;
}
}
public string Scale
{
set
{
scale = value;
}
get
{
return scale;
}
}





}
}

It is good that you have C# knowledge, Class Model design is heuristic process . You are the only person who completes your class diagram. In between you need to take particle approach I found Code Complete 2[^], very good book for quality code and design as well.

Happy Programming
 
Share this answer
 
v2
Comments
Muhammad Tufail 1979 11-Dec-11 9:59am    
this is book is not free to download .....
[no name] 11-Dec-11 10:17am    
he he he.. boss! buy it. Don't do piracy.
To Develop This Kind Of Project Think From Starting When A Student Comes to college for admission Here Student Is Your An Object After That He fills a form that requires some information from the student these are the property of the student object. He/She Takes Admission In A Particular Couse Here is Your Another Object "Course" Think About Property Of Object.

Think About The Requirement of the project and you will prepare object
In Case of any help you can mail me to :
 
Share this answer
 
v2
Comments
[no name] 11-Dec-11 9:42am    
Don't give your email id like this on CP. Why not to communicate here only?
[no name] 11-Dec-11 9:43am    
NO Problem Friend
[no name] 11-Dec-11 9:45am    
Thx vijay.
OK ! What is the relation between Student and the course . A student is enrolled in the course than you can make another object student_course which have enrolment and course consider this

class student
{
string enrollment_no
string name
.
.
.
.
.
.


}

class course
{
string course_code
string course_name
}




class student_course
{
string course_code
string enrollment_no
}

USE ER-MODELING to find intermidiate class/objects
 
Share this answer
 
Comments
Vijay Kr Sharma 14-Dec-11 22:05pm    
Why Not If You Help Your Self No one can stop you
Vijay Kr Sharma 22-Dec-11 6:38am    
make clear what u want to say
Vijay Kr Sharma 22-Dec-11 6:40am    
why you want to upload that on thissite
Muhammad Tufail 1979 22-Dec-11 6:44am    
because to discuss with u people... and u find some mistakes and give me some guide lines on that...
Vijay Kr Sharma 22-Dec-11 6:51am    
have you make the class diagram on paper or not

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900