COMPUTER SCIENCE JAVA

posted by .

Assignment problems:

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
formatted string.

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.

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. Java

    I am trying to write an algorithm for my JAVA class and am having some issues....if I were to post my program is there anyone on here that could help me figure out what I am doing wrong?
  2. Computer Science-Java

    Hi, I have to write a method that returns my first name, middle initial, and last name as a single String and call the method in java. So far, I have: public class ReturnName { static String fullname(String firstname, String middleinitial, …
  3. COMPUTER SCIENCE JAVA

    Assignment problems: 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 …
  4. Java Programming

    I'm new to Java and I'm not sure how to write the source code for this problem I got in class... Write a java program using the while and if statement that will accept ten student grades and that will display the sum of the grades, …
  5. java programming

    write a java program using arrays function for hotel bill calculation?
  6. JAVA PROGRAMMING

    im new to java and this is my first assignment can anyone help me solving it: compile the class final grades, based on the students’ scores obtained in the classwork, mid-term, and final exams. According to the course syllabus, the …
  7. pseudo code algorithm

    Convert your algorithm from Question One into a complete Java application. Marks will be allocated based upon: ● Your Java code matching your pseudo code algorithm from Question One. ● Your Java code being syntactically …
  8. computer science java

    write a program in java for a grocery (fruit shop calculate the prize of bananas @ $.89/kg declaring the the prices of all either as instances or class variables.declare the weight of the fruit as local variables
  9. computer, science, java, software

    Write a Java program to declare and store numbers from 1 to 10 in a single dimensional array and display the output in the following format. 1 2 3 4 5 6 7 8 9 10
  10. Computer science

    Final project Which is currency converter by camera from € to £ for example And not need to be perfect program so simple as my teacher told me and by java language So its like making an application then write the report 6300 around …

More Similar Questions