write a java program that enters students names, test 1, test 2, test 3 scores and calculate average for each student " use arrays"
You will be given two integers x and y as input, you have to compute x/y . If x and y are not integers or if y is zero, exception will occur and you have to report it. You should use try and catch blocks to handle the exception. You also have to include a finally block to show output "Output from finally block". Read sample Input/Output to know what to report in case of exceptions.
10
3
3
Output from finally block
10
Hello
Check your input: java.util.InputMismatchException
Output from finally block
10
Value is undefined: java.lang.ArithmeticException: / by zero
Output from finally block
23.323
Check your input: java.util.InputMismatchException
Output from finally block
Draw the logic diagram, logic expression, the timing diagram and truth table of the output for a simple car alarm system.
Write a function in C++ to calculate and return the roots of a quadratic equation ax2 + bx + c = 0.
Return x1 and x2 through
parameter of the function. The prototype of this function is defined by:
void solveEquation(int a, int b, int c, float *x1, float *x2);
Write a function in C++ program to exchange two numbers.
These two variables are passed through parameters of the
function using pointer. void exchange(int *a, int *b)
Print a welcome message to the screen as follows:
We bid welcome to the ladies of Beauxbaton and our friends from the north, the sons of Durmstrang.
Q: Write a program that displays the following menu to the user:
Press 1 for Permanent Employee
Press 2 for Daily wages Employee
After selecting the appropriate employee calculate salary for the employees.
The daily wages employees are paid 400 per hour while permanent employees are paid 800 per hour. First you need to ask for the number of hours for which the employee has worked so far and then calculate and display the salary of each type of employee.
Perform the above-mentioned task using switch statement.
Your task is to implement this:
• A member variable that will hold the annual interest rate of the loan. Its default value will be 2.5.
• A member variable that will hold the number of years for the loan. Its default value will be 1.
• A member variable that will hold the loan amount. Its default variable will be 1000.
• A default constructor.
• Another constructor that has interest rate, years, and loan amount as its parameters.
• A member function that returns the annual interest rate of this loan.
• A member function that returns the number of the years of this loan.
• A member function that returns the amount of this loan.
• A member function that returns the monthly payment of this loan.
• A member function that returns the total payment of this loan.
Enter yearly interest rate, for example 8.25: 10
Enter number of years as an integer, for example 5: 5
Enter loan amount, for example 120000.95: 300000
The monthly payment is 6374.11
The total payment is 382446.80
run a code with c++ and comments to explain and use binary search tree
when the tree leaf goes to the left side grows bigger and when the tree leaf goes into the right side grows smaller. The subject: Data Structure &algorithms specific Tree(BST)
1. Write a Linux shell script that performs the following tasks:
a. Provide a mystery integer between 1 to 10.
b. Using “while” loop, allow the user to guess the random number until the user got it right.
c. If the user’s entered number is lower or greater than the random number, notify the user to guess higher or lower respectively.
d. If the user enters any number out of the 1 to 10 range, notify the user to enter in the correct number range.
e. Display a congratulatory message along with the random number if the user guessed it correctly.
Provide the shell script along with the sample output screenshot.