Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Coding on Object oriented Programming

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Coding on Object oriented Programming

    Help me with my test.I don't know how to start it !
    Attached Files Attached Files


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    18,647
    Thanks
    45
    Thanked 1,959 Times in 1,933 Posts

    Default Re: Coding on Object oriented Programming

    Please post your code and questions here on the forum. No links.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Coding on Object oriented Programming

    Student
    #matricNo: String
    #name: String
    #course: String
    +Student(matricNo: String,
    name: String, course: String)
    +Display( ):void
    UnderGrad
    ‐CGPA: double
    + UnderGrad (matricNo: String,
    name: String, course: String,
    CGPA: double)
    +Display( ):void
    PostGrad
    ‐ResearchArea: String
    + PostGrad (matricNo: String,
    name: String, course: String,
    ResearchArea: String)
    +Display( ):void
    Supervisor
    ‐StaffID: String
    ‐SName: String
    ‐Dept: String
    ‐svStudent: Arraylist<String>
    + Supervisor (StaffID: String,
    SName: String, Dept: String)
    +setSvStudents(svStudent:
    Arraylist<String>): void
    +DispSvStud( ):void

    Write a complete program based on the class diagram above. You are required to show
    inheritance concept inside your program. Use the following information to produce the code:
    ‐ Use the constructor for each class to initialize class attributes and accepts parameters sent.
    For the subclasses (UnderGrad & PostGrad), they will also initialize its superclass
    attributes.
    ‐ Display() method:
    ‐ Student class: display all attributes.
    ‐ UnderGrad class: display all superclass attributes and CGPA.
    ‐ PostGrad class: display all superclass attributes and Research Area.
    - For the Supervisor class, the constructor will be used to initialize the value for attributes
    StaffID, SName and Dept. svStudent will store the list of students’ names that are
    under the supervisor’s supervision. The value for the svStudent will be assigned using
    setSvStudents() method. This method will receive an Arraylist of type String as
    parameter. And then this ArrayList will be assigned to the ArrayList svStudent that has
    been declared before.
    - DispSvStud()method will display the supervisor name and all students under his/her
    supervision (the content of the ArrayList).
    ‐ You are required to write the main() method to implement the classes that have been
    defined.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    18,647
    Thanks
    45
    Thanked 1,959 Times in 1,933 Posts

    Default Re: Coding on Object oriented Programming

    Did you have any specific questions about your assignment?
    What have you tried?
    Post your code and your questions about the problems you are having.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. What Exactly Object Oriented Programming is ??
    By diyaots in forum Object Oriented Programming
    Replies: 3
    Last Post: September 10th, 2013, 08:08 AM
  2. Object Oriented Programming
    By calebite207 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: November 17th, 2012, 11:27 AM
  3. help for Object Oriented Programming RMI
    By clapton in forum Object Oriented Programming
    Replies: 2
    Last Post: March 22nd, 2012, 05:38 AM
  4. Object oriented programming
    By merr78 in forum What's Wrong With My Code?
    Replies: 3
    Last Post: February 9th, 2012, 12:32 AM
  5. Object oriented programming
    By jonnitwo in forum Object Oriented Programming
    Replies: 8
    Last Post: September 2nd, 2011, 12:18 PM