Posted by AHMED on Monday, October 15, 2012 at 4:52pm.
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.
Answer this Question
Computer Language Java - What is the concept of multi-threading in java and how ...
java programming - write a java program using arrays function for hotel bill ...
Java - I am trying to write an algorithm for my JAVA class and am having some ...
computer - this isnt really a school question but i have a question about the ...
COMPUTER SCIENCE JAVA - Assignment problems: Write Java programs for each of the...
Computer Science-Java - Hi, I have to write a method that returns my first name...
Java Programming - I'm new to Java and I'm not sure how to write the source code...
java - Write a java application that finds the smallest of several integers. ...
JAVA PROGRAMMING - "POWERS" Compute the power of a number given the base and ...
computer science - Who invented Java?