Question
Craete a program in C# 1. Create a class DSC. -- One data memeber: private string schoolName, set default value to Daytona State College. Create
Craete a program in C#
1. Create a class "DSC". -- One data memeber: private string schoolName, set default value to "Daytona State College". Create a property for it. -- Create a method "public virtual string ShowAddress()", return " 1200 W. International Speedway Blvd., Daytona Beach, Florida 32114 "; 2. Create a class "Campus", inheritate "DSC". -- One data memeber: private string campusName. Create a property for it. -- Create a constructor "public Campus(string cName)", set value for campusName. -- override ShowAddress(), return " 1770 Williamson Blvd., Daytona Beach, Florida 32117 "; -- Create "public string Departments()", return "Computer Scinece Department, Emergency Care Department, Police Academy"; -- override ToString(), use above properties and methods to display the following result when it is called. Daytona State College Advanced Technology College is located at 1770 Williamson Blvd., Daytona Beach, Florida 32117, it has Computer Scinece Department, Emergency Care Department, Police Academy 3. In main() static void Main(string[] args) { Campus atc = new Campus("Advanced Technology College"); Console.WriteLine(atc.ToString()); }
OUTPUT
Select C:\WIND Daytona State College Advanced Technology College is located at 1770 Williamson Blvd., Daytona Beach, Florida 32117 it has Computer Scinece Department Police Academy Emergency Care Department Press any key to continueStep 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