Program to draw line, Rectangle, and Ellipse


Computer science


Question Description

Apply polymorphism and dynamic binding to draw a line, Rectangle, and Ellipse.

Please see the attached question requirement. Most of the code has been written just needs some more.

Unformatted Attachment Preview

1. Develop a C# drawing program as shown in the next page. The following lists the requirements. A. Apply polymorphism and dynamic binding for development of this drawing program. B. Provide three buttons for the user to choose or change a desired shape for drawing. C. A shape can be a line, a rectangle or an ellipse, and can be drawn in an arbitrary direction. D. A color based on RGB values can be set to color the subsequent drawn shapes. E. The dynamic binding will call a shape’s drawColoredShape method to draw its own shape based on the set color. F. The system starts with a small window and the user can resize the window without erasing the previously drawn shapes. Hints: The Graphics, Bitmap, Color, Pen and Brush classes are likely to be used. C# Keywords: virtual, override, abstract and internal may be useful. Feel free to check the C# 6.0 Specification and the Java-Csharp_Comparison.html file posted below Lab 1 on Canvas. 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); Rubrics: ● Polymorphism and dynamic binding: (2 pts) ● Program correctness: (3 pts) ● Double buffering technique applied: (2 points) ...
Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

This question has not been answered.

Create a free account to get help with this and any other question!

Similar Questions
Related Tags