Create a class named Tape that includes fi elds for length and width in inches and properties for each fi eld. Also include a ToString() method that returns a string constructed from the return value...


Create a class named Tape that includes fi elds for length and width in inches and properties for each fi eld. 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 fi elds. Derive two subclasses—VideoTape and AdhesiveTape. Th e VideoTape class includes an integer fi eld to hold playing time in minutes and a property for the fi eld. Th e AdhesiveTape class includes an integer fi eld that holds a stickiness factor—a value restricted to fall in the range of 1 to 10—and a property for the fi eld. 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. Save the fi le as TapeDemo.cs.



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here