您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)

 

Apply Index

Apply Page # 1

Activity 1 — Geometric class constants

(1) Create a class Shape which defines the following class constants:

numSidesSquare = 4

numSidesTriangle = 3;

numSidesPentagon = 5;

(2) Write an applet to test your class constants, that displays the following output on screen:

Discussion/Suggested solution to Activity 1
Back to content

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg