0% found this document useful (0 votes)
2 views1 page

LabCourse Class Implementation in Java

The document defines a class called LabCourse that extends a Course class. It includes attributes for lab hours and whether there is a separate lab grade, along with a constructor to initialize these attributes. The toString method is overridden to provide a string representation of the LabCourse object, including its lab hours and separate lab grade status.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

LabCourse Class Implementation in Java

The document defines a class called LabCourse that extends a Course class. It includes attributes for lab hours and whether there is a separate lab grade, along with a constructor to initialize these attributes. The toString method is overridden to provide a string representation of the LabCourse object, including its lab hours and separate lab grade status.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

public class LabCourse extends Course {

private int labHours;

private boolean hasSeparateLabGrade;

public LabCourse(String title, String number, String description,

String department, int labHours, boolean hasSeparateLabGrade) {

super(title, number, description, department);

[Link] = labHours;

[Link] = hasSeparateLabGrade;

@Override

public String toString() {

return [Link]() + "\nLab Hours: " + labHours +

"\nSeparate Lab Grade: " + hasSeparateLabGrade;

You might also like