CS411 Visual Programming - Assignment No.2 Solution 2021 With Full Explanation

preview_player
Показать описание
#CS411 #VU #AssignmentSolution #CS411AssignmentSolution
You are required to create a C# Console application using Visual Studio to calculate area of rectangle with the following functional requirements:

Create an interface and name it “Shape”. And it will contain declaration of two methods.
1) getInput 2) area

Create a single class
1. Rectangle

Rectangle class will have a function getInput() to take input values from user and area() to calculate the area of respective category.

Your Program should have the following functionalities:

• First you have to take your VUID as a input.

• In the Rectangle class create a function getInput() in which you will take an input from the user for the attribute length and width. You have to take first digit of your VUID as length of rectangle and last two digit of VUID as a width. For example, if your ID is BS123456789 so your length value should be 1 and width value should be 89. Now create a function area() to calculate the area of rectangle. . (Note: You should also have to check if the first and last two numeric character of your vu id is zero then your code should increment it with 1 so in any case your code should not return zero answer. This check is compulsory for every student, whether your vuid has 0 as the starting or ending digit or not)
Рекомендации по теме
welcome to shbcf.ru