Home CPSC 240

Lab 3: Writing a Class



To work on coding a class based off a UML diagram



For this lab, you will be writing the Java code for the class that you made the UML diagram for last lab. Pull up your diagram and base the Java class off of that.

A few notes on the implementation of the methods:



You can use the Main.java file to test your program. You might have to change your method names slightly to work with this (but please do so, cause that's how I'll grade your lab).

Here is an example run:

$ java Main
Alice, Johnson	1	0.00	0
Bob, Williams	2	0.00	0
Claire, Smith	3	0.00	0

Alice, Johnson	1	2.28	124
Bob, Williams	2	2.36	122
Claire, Smith	3	2.16	117
Alice can graduate.
Bob can graduate.
Claire CAN'T graduate.



When you are done, please submit the Java code under the assignment in Canvas.

You only need to submit the Student.java file, not the Main.java one.

Copyright © 2021 Ian Finlayson | Licensed under a Creative Commons Attribution 4.0 International License.