I NEED HELP For the following, determine the most appropriate data type to use f
ID: 3663896 • Letter: I
Question
I NEED HELP
For the following, determine the most appropriate data type to use for a variable to represent the data, and then give the C#.NET declaration required for the variable. A variable "Age" to represent the age of a painting in a museum's ait collection. A variable "Acquired" which will hold the value of the date a painting is acquired by a museum. A variable "Cost" which will be used for financial calculations (representing dollar amounts down to the cent). A variable "Is LA Resident" which will represent whether a student has to pay in state tuition. A variable "Quantity" which will only numeric integer values between 0 and 100,000. A variable "Student ID" which will take on values of a student's ID number (including hyphen's, as in 89-111-1111).Explanation / Answer
Data Types of variables :
Age : It can be of type Integer
Acquired : It can be of type String
Cost : It can be of type Double
Is_LA_Resident : it can be of type Boolean
Quantity : it can of type of Integer
StudentID : It can be of type String
C# Declaration :
int Age;
String Acquired;
double Cost;
bool Is_LA_Resident;
int Quantity;
String StudentID;
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.