TECHNOLOGEPH

A Computer Science Curriculum for Kids




Lesson 4: Objects, Classes and Methods




Plugged Activites


  1. Create a triangle class with two two attributes, “base” and “height.” Include setter and getter methods for the two attributes, and area method that returns the area of the triangle, and a string representation method.