Question: Develop and test the following C# methods. 1). Write a BalanceTest method which receives a string of characters representing a math expression such as 2*(a+b)/(c-d)+(2ef).
Develop and test the following C# methods.
1). Write a BalanceTest method which receives a string of characters representing a math expression such as 2*(a+b)/(c-d)+(2ef). If the opening brackets match the closing brackets, the method returns true. Otherwise, the method returns false. The method should use the C# Stack class. Test several expressions (with balanced or unbalanced brackets) and take screenshots;
2). Write a C# class named Car with three attributes: colour, model and year. Implement necessary constructors and getters/setters;
3). Create five Car objects and store them in an ArrayList. Using the foreach loop to have each Car object in the ArrayList print its model. Run the program and take screenshots;
4). Create five Car objects and store them in a Queue. Use a loop to have each Car object in the Queue print its colour (dequeue the objects one at a time).
Run the program and take screenshots;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
