Skip to main content
ICT
Lesson A2 - Object Oriented Programming
 
Main   Previous Next
 

LAB ASSIGNMENT A2.1 page 9 of 10

Benzene

Background:

Benzene is a very common and useful organic compound. Its chemical formula is C6H6 and is often drawn in abbreviated symbol form as a circle centered inside of a hexagon. Here’s an example:

Assignment:

This program will use the gpdraw library introduced in Student Lesson A1. Refer to the DrawingTool Class Specifications. Write a program that creates the benzene ring symbol consisting of a circle centered inside a hexagon. The circle does not touch the outer hexagon, as indicated in the example picture.

Instructions:

  1. Include your name as a documentation statement and also a brief description of the program.

  2. You will need to turn in (either on paper or electronically) a copy of your code and a picture of the benzene ring that resulted.

 

Main   Previous
Contact
 © ICT 2006, All Rights Reserved.