Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1 . Develop a C# drawing program as shown in the diagram. The following lists the requirements. Apply polymorphism and dynamic binding for development of

1. Develop a C# drawing program as shown in the diagram. The following lists the requirements.
Apply polymorphism and dynamic binding for development of this drawing program.
Provide three buttons for the user to choose or change a desired shape for drawing.
A shape can be a line, a rectangle or an ellipse, and can be drawn in an arbitrary direction.
A color based on RGB values can be set to color the subsequent drawn shapes.
The dynamic binding will call the shapes drawColoredShape method to draw its own shape based on the set color.
The system starts with a small window and the user can resize the window without erasing the previously drawn shapes.
When drawing a shape, the mouse movement will change the size of the drawn shape.
Hints: The Graphics, Bitmap, Color, Pen and Brush classes are likely to be used.
C# Keywords: virtual, override, abstract and internal may be useful.
The Bitmap class is good for double buffering technique by using two images as the buffers. The background Bitmap image should be filled up with a color first to prevent undesirable transparent effect.
Bitmap bm = new Bitmap(sizeX, sizeY);
Graphics g = Graphics.FromImage(bm);Paint Program
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic Net Database Programming

Authors: Rod Stephens

1st Edition

0789726815, 978-0789726810

More Books

Students also viewed these Databases questions