TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Caleb Adeyemo
NA
1
2.1k
C# Program
Feb 15 2011 8:42 PM
Please I need help writing a complete Rectangle class which represents a common rectangle figure with four sides(two pairs of parallel opposite sides). The class is to have two variables- length and Width which may hold two values with decimal points. Two constructors are needed. The default contructor is to initialize length and width to 1.0 each. The second contructor must pass-in two values to initialize length and width. There has to be six methods to do the following:SetLength,SetWidth,GetLength,GetWidth,GetArea,andGetPerimeter. The perimeter is the sum of all sides of a rectangle. From the Program class, three instances of the Rectangle class are to be created. The first instance, named rectOne, must use the default construcion. The second instance, named rectTwo, must also use the default construction. The third instance,named rectThree, must use the parameter constructor with values of 20 for length and 30 for width. After rectTwo is created, the SetLength and SetWidth methods are to be used to set length to 10 and width to 15. For all three intances of the class, we need to print the length,width, area, and perimeter using proper methods.
Reply
Answers (
1
)
ASP.Net Form POstback and IIS
adrotator