Question
C# Create a class called RoomInfo: It includes the following private variables for class: length (double) width (double) hasTV (bool) houseSize(static double) It also includes
C#
Create a class called RoomInfo: It includes the following private variables for class: length (double) width (double) hasTV (bool) houseSize(static double) It also includes the following functions for class: Constructors Properties for each variable calcRoomSize: this function calculates the room size and update the house size. Create a class called RoomInfoDemo: It includes the following functions: 1. main function: create an array of four RoomInfo objects call getData function for each room Display room and house size Display number of rooms have TV 2. getData function: pass the object into this function via parameter prompt user to enter the length and width for each room prompt user to enter: Y if there is a TV in the room or N if there is none, and save the result in the hasTV variable.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started