Title Point Class Hierarchy (Case 2)
Catalog Type SLCItem
Persistent ID https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/inheritance_point__68bdb309f6cc3d7a9cc097a4?index=1
Platform Name PCEX
Features
Description Suppose we have a class Point and we want to extend it to produce class Point3D. The class Point has two data members, x and y that represent the point's integer coordinates in the two-dimensional space. A Point3D has three data members, x, y, and z that represent the point's integer coordinates in the three-dimensional space. For each class, write the class declaration, the constructor, the toString method, and a method to move (translate) the point, i.e., shift the point's location by the specified amount.\n\nThe class InheritancePointTester2 tests these classes and their methods.
Keywords
Author Mohammad Hassany
Institution University of Pittsburgh
Iframe URL https://acos.cs.vt.edu/html/acos-pcex/acos-pcex-examples/inheritance_point__68bdb309f6cc3d7a9cc097a4?index=1
Protocol SPLICE
Protocol URL
License MIT
Programming Language JAVA
Natural Language en

Preview

SPLICE Output