Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/* This program uses three parallel * arrays to display the class name * and how many places are left in that * class. */
/* This program uses three parallel * arrays to display the class name * and how many places are left in that * class. */ using System; namespace ClassEnrolment { class ClassEnrolment { public static void Main() { string[] className = new string[] { "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" }; int[] currentEnrolment = new int[] { 38, 23, 28, 20, 22 }; int[] maximumEnrolment = new int[] { 40, 23, 28, 22, 25 }; Console.WriteLine("Number of places still available for each class. "); // Write a "for" loop here, using the className.Length property. // Do not change any of the existing lines of code. // ... // ... // ... ExitProgram(); } public static void ExitProgram() { Console.Write("Press enter to continue ..."); Console.ReadLine(); } } }Using C# complete the partially complete program a program designed to show the number of enrolment positions open for each class, or display that the class is full if that is the case. The completed program should first display the text "Number of places still available for each class." followed by a blank line. Following this blank line, it should display one line of text for each class. That line should be of the following format: "(class name) has (number of places left) places left." The number of places left in each class is the maximum enrolment minus the current enrolment. If there are no places left (the current enrolment is the same as the maximum enrolment) this line should instead be displayed: "(class name) is full." A framework has been provided for your convenience in writing the program. The comments direct you to where you should insert your own code. Do not change any of the other lines in the program
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