Purchase Solution

Attributes and Methods for Objects in Java

Not what you're looking for?

Ask Custom Question

I am having problems identifing the appropriate class names, attributes and methods for the following objects. I need at least 3 attributes and 3 methods for each class.


For Example:

Class Name


setStudentID(ssn, fname);

I have part of it done but im not sure where to go from there.

public class Student {

// methods
public void setName(String name){}
public void getStudentName(){}
public void setTotalStudentCount(){}
public void getTotalStudentCount(){}
public void setSS(String ssn){}
public void getSS(){}

// attrs
String name;
String ssn;
String studentMajor;

Purchase this Solution

Solution Summary

A java problem is targeted.

Solution Preview

Yes, the relationship between the four objects are very complicated. However, there's something we should remember, students choose teacher, students take course, teachers add student, teachers teach courses, courses have info of students and teachers, major has info of students.
<br>class Student {
<br> protected Faculty[] advisor;
<br> private Course[] classes;
<br> protected String name;
<br> protected String ssn;
<br> protected String major;
<br> private int numberClasses;
<br> public String GetName()
<br> public String GetSSN()
<br> public String GetMajor()
<br> public String GetNumofClasses()
<br> public void setAdvisor(Faculty ...

Purchase this Solution

Free BrainMass Quizzes
Excel Introductory Quiz

This quiz tests your knowledge of basics of MS-Excel.

Basic UNIX commands

Use this quiz to check your knowledge of a few common UNIX commands. The quiz covers some of the most essential UNIX commands and their basic usage. If you can pass this quiz then you are clearly on your way to becoming an effective UNIX command line user.

Inserting and deleting in a linked list

This quiz tests your understanding of how to insert and delete elements in a linked list. Understanding of the use of linked lists, and the related performance aspects, is an important fundamental skill of computer science data structures.

Word 2010: Tables

Have you never worked with Tables in Word 2010? Maybe it has been a while since you have used a Table in Word and you need to brush up on your skills. Several keywords and popular options are discussed as you go through this quiz.

Java loops

This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.