ITI 1121 Study Guide - Quiz Guide: Khoa, Instance Variable, Unified Modeling Language

119 views12 pages

Document Summary

Ecole de science informatique et de g enie electrique. Instructors: opeyemi adesina, sherif aly, guy-vincent jourdan and marcel turcotte. Section: a or b or c or d. No part of this document may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording or otherwise without prior written permission from the instructors. First, you will write the class point, which simply represents a point on a two-dimensional plane. Objects of this class have two instance vari- ables, x and y, which record the coordinate of the point. The constructor of the class receives these 2 elements of information as parameters. In the space below, provide the code for the class point, including one constructor, all the necessary getter and setter methods, as well as an implementation of the instance method tostring. You now create a class coloredpoint, which is a specialized version of the class point.