Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

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 will need to complete the following objectives as a C# Windows Form Application: 1. When the program starts the user needs to be asked if they want to make a new entry or to view a previous entry 2. If the user wants to make a new entry, the first question will be how many meters they travelled (this will then need to be converted into kilometers) 3. The second question will give the user 3 options to choose from, and each option will have a value. The options are as follows: a. Hatchback = 3 b. SUV = 3.5 c. Sports car = 4. When the user has selected an option that options value needs to be multiplied by the distance they travelled in kilometers 4. The third question will allow the user to entera description, of where they travel to and why did they travel there. 5. All the information above needs to then be saved into a JSON file 6. If the user says he want to view a previous entry the JSON file needs to be loaded and displayed.
Question 6 [15 Marks] Write a C++ programme to create a class by name Employee. The Employee class should have the following data members 1. Employee_Id 2. Employee_Name 3. Position 4. Department 5. Basic_Pay 6. Deductions (Car Loans, Home Loans, and any other type of loans) The Employee class should have the following member functions. Accept()- It is used to get input for all data members. Total_Salary() – calculates the salary includes HRA 25%, DA 12% & Vehicle allowance 15% of Basic_Pay. This Basic_Pay will be varied based on the different positions. Display() - display all the data that has been received as input along with the calculated salary. Salary is calculated by the formula Salary = Basic_Pay + HRA + DA+ vehicle allowance - deductions. Create N number of Employee details with the necessary object for this class to run this program effectively. (Implement the OOPS concepts Polymorphism, inheritance, and Friend function wherever it is necessary)

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. 



First Perfect Square Given two integers (M and N), write a program to print the first perfect square in a given range.Input The first line of input will contain a positive integer (M). The second line of input will contain a positive integer (N).Output The output should be a single line containing the first perfect square in a given range.Explanation For example, if the given numbers are M is 4 and N is 16, the perfect squares from 4 to 16 are 4(2 * 2), 9(3 * 3), and 16(4 * 4), as the first perfect square is 4. So the output should be 4. Sample Input 1 4 16 Sample Output 1 4 Sample Input 2 5 8 Sample Output 2 No Perfect Square
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 Travellers



Use Switch case and Perform the below Operatios


case-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 Exit

Define 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.


Add two polynomials Given two polynomials A and B, write a program that adds the given two polynomials A and B.Input The first line contains a single integer M. Next M lines contain two integers Pi, Ci separated with space, where Pi denotes power and Ci denotes co-efficient of Pi for polynomial A. After that next line contains a single integer N. Next N lines contain two integers Pj, Cj separated with space, where Pj denotes power and Cj denotes co-efficient of Pj for polynomial B. Input 1 4 0 5 1 0 2 10 3 6 3 0 1 1 2 2 4 output 1 6x^3 + 14x^2 + 2x + 6 input 2 4 0 5 1 0 2 10 3 6 4 0 -5 1 0 2 -10 3 -6 output2

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?


LATEST TUTORIALS
APPROVED BY CLIENTS