Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a new C# class library (dynamic link library) and create the following classes. Call the project DLLExample. Class Circle and functions Circumference and Area.

Create a new C# class library (dynamic link library) and create the following classes. Call the project DLLExample.

Class Circle and functions Circumference and Area. Both circumference and area accept one parameter - the radius of a circle - and calculate, respectively, the area and the circumference based on the radius passed in.

Class Rectangle and functions Perimeter and Area which both accept two parameters, height and width and calculate the perimeter and area of the rectangle based on these.

Class Person which accepts a date and calculates the age of the person based on that date.

Build the class library project.

Create a new windows form project (called ObjectExample) and add a reference to the dll created above.

On a form, add a textbox for the radius of a circle and two buttons calculate circumference and calculate area. Call the dll function to do this and show the radius and circumference in a messagebox or in a textbox.

Add 2 textboxes, Height and Width and two buttons calculate perimeter and calculate area. Call the dll function to show the results of these.

Finally, add a datetimepicker to the form. Call the dll function to calculate the age of the person based on this date.

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

Advances In Spatial And Temporal Databases 10th International Symposium Sstd 2007 Boston Ma Usa July 2007 Proceedings Lncs 4605

Authors: Dimitris Papadias ,Donghui Zhang ,George Kollios

2007th Edition

3540735399, 978-3540735397

More Books

Students also viewed these Databases questions