Tutorial For Week 10: Object Oriented Programming
Tutorial For Week 10: Object Oriented Programming
Task
Generate the code in Java using the UML class diagram for Teacher and Student Class.
Groups
This task is to be done in a group of three.
Process
public Student() {
}
public void setGrade(String newgrade) {
studentGrade=newgrade;
}
public Teacher() {
3. The Teacher class defines the main method, which is entry point for
this application. Run the Teacher class:
$ java Teacher
ClassPath Problems
$ java Teacher
Can't find class Teacher
it probably means your CLASSPATH environment variable isn't properly set up. Make
sure it includes the current directory as well as the location where the classes.zip file was
installed. On Unix it should look something like this:
CLASSPATH=.:/usr/local/java-1.4/lib
C:\JDK\JAVA\CLASSES;c:\java\lib\classes.zip
Under Windows you set the CLASSPATH environment variable with a DOS command
like
C:\> SET
CLASSPATH=C:\JDK\JAVA\CLASSES;c:\java\lib\classes.zip