Friday, July 15, 2011

This is a C# Program. How do i write this.?

Create a class name Tape that includes fields for length and width in inches and properties for each field. Also include a ToString () method that returns a string constructed from the return value of the object's GetType() method and the values of the length and width fields. Derive two subclasses-VideoCassetteTape and AdhesiveTape. The VideoCassetteTape class includes an integer field to hold playing time in minutes and a property for the field. The AdhesiveTape class includes an integer field that holds a stickiness factor- a value from 1 to 10-and a property for the field. Write a program that instantiates one object of each of the three classes, and demonstrate that all of each class's methods work correctly. Be sure to use valid and invalid values when testing the numbers you can use to set the AdhesiveTape class stickiness factor.

No comments:

Post a Comment