Posted by AHMED on Monday, October 15, 2012 at 5:01pm.
Write Java programs for each of the following.
1. Students in a university class are being organized into groups of three for
an upcoming research project. To model this situation:
a. Write a Student class that stores the name, email address and phone
number of a single student. Include two constructors - one that allows
initial values to be set for each of these attributes via parameters and a
second that simply initializes the attributes to empty strings. Your class
should have getter and setter methods for all attributes as well as a
toString method that returns all information about the student in a nicely
b. Write a Group class to collect the three students comprising a group.
Your class should have a single getter and a single setter method to get or
set a particular student. Note that the caller will indicate which student
(1,2 or 3) is to be gotten or set via a parameter. Also include a simple
constructor that sets the three students to null and a toString method that
returns all information about all students in the group.
c. Write a driver class to create a couple of groups, populate them with
students and test your methods.
No one has answered this question yet.
Answer this Question
COMPUTER SCIENCE JAVA - Assignment problems: Write Java programs for each of the...
Java - I am trying to write an algorithm for my JAVA class and am having some ...
Computer Language Java - What is the concept of multi-threading in java and how ...
Computer Science-Java - Hi, I have to write a method that returns my first name...
Computer Science - Java - Hi, For an assignment I am doing, we have to have 2 ...
Computer Science - Consider the following application files: /JavaCS1/src/...
java - Write a java application that finds the smallest of several integers. ...
Computer Science - Could someone show me an example of a service class that ...
Java - create a java program that accepts students names, and test scores from a...
computer - this isnt really a school question but i have a question about the ...
For Further Reading