In-Lab Task 2: Testing if a mathematical expression is balanced or not. Write a function that checks whether parentheses in a mathematical expression are balanced or not. The input to the function will be a pointer to a null-terminated array of characters (string). Assume that all the operands in the expression are single-digit numbers. You should call this function from ‘main’ function to demonstrate that it works as intended. The function should return 0 if the expression is balanced, and the index of mismatch otherwise. The function prototype is given below: int isBalanced(char * ptr_array);
In-lab Task 1: Reversing an array of numbers. You have to write a function to reverse the order of integers in an array. Call this function from your main function to demonstrate that this function successfully reverses (in-place) the contents of the input array. You should declare and use a stack within this function. The functions for stack implementation are already given to you. The prototype for the function is given below; void reverse_num_array(int * num_array);
You are required to build a class to represent the a cup of coffee. Call your class
CoffeeCup. A coffee cup will have following characteristics
1. type (sting) // can be mocha, cupaccino, etc
2. temperature (float): represents the measure of
temperature in degrees
3. volume (float):// the volume of coffee in the cup in ml
liters
4. sugar (int):// no of teaspoons of sugar added to the coffee
5. bool hasMore(): //this method checks if the cup has coffee in it that a person can take a sip
from. For the implementation assume that one sip consumes a volume of 0.3 ml. So you will do
some calculations in this method to check if it has any sips left depending upon the volume
available.
6. bool isEmpty(): // returns true if a person can take a sip from this cup and false otherwise
7. bool takeASip():// this method represents the actual act of sipping. One sip is taken i.e. the
volume equivalent to one sip is taken away.
8. Provide a method print, that displays the status of the cup with respect to all data members.
Complete the class Traveller as per the below requirement**class Traveller**Define the following properties. properties should be private: -id : int
-travelType : String
-price : double
-locations : String- Define Getters and setters for all properties - Define parameterized constructor-- Create TravelProcess class and define ArrayList of 10 TravellersUse Switch case and Perform the below Operatioscase-1 add new Traveller with the list
case-2 Display all the traveller details
case-3 Search for a specific traveller and display if found
case-4 ExitDefine a class Customer that holds private fields for a customer's ID, first name, last name, address and credit limit.
Define functions that set the fields of customer. For example setCustomerID().
Define functions that show the fields of customer. For example getCustomerID().
Use constructor to set the default values to each of the field.
Overload at least six constructor of the customer class.
Define a function that takes input from user and set the all fields of customer data.
Define a function that displays the entire customer’s data.
Write a Program in C# which take two dimension jagged integer array from user, after that display number in the form of Odd and Even from whole array?