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

Write a program to implement binary search on 5 elements.


Weekends

Given two dates D1 and D2, write a program to count the number of Saturdays and Sundays from D1 to D2 (including D1 and D2).

The date in string format is like "8 Feb 2021".Input


The first line of input will contain date D1 in the string format.

The second line of input will contain date D2 in the string format.Output


The output should be a single line containing two integers separated by space.Explanation


For example, if the given dates are "25 Jan 2021" and "14 Feb 2021", the Saturdays and Sundays dates from "25 Jan 2021" to "14 Feb 2021" are

"30 Jan 2021" is a Saturday

"31 Jan 2021" is a Sunday

"6 Feb 2021" is a Saturday

"7 Feb 2021" is a Sunday

"13 Feb 2021" is a Saturday

"14 Feb 2021" is a Sunday

So the output should be

Saturday: 3

Sunday: 3

Sample Input 1

25 Jan 2021

14 Feb 2021

Sample Output 1

Saturday: 3

Sunday: 3


Scanner Class


Write a JAVA program that will compute for the net income of a particular employee. You have to accept name, position, and number of days worked. The position has three categories: if Manager, rate per day is P500; if Supervisor, P400; if Employee, P300. Then after accepting the rate per day, compute gross = rate per day * no. of days worked, compute for the bonus, if gross is >= 8000, bonus = 1000; if gross>= 5000, bonus = 750; if gross >= 3000, bonus = 500; if less, bonus = 0; compute for the deductions: SSS is always 10% of gross; Medicare is always P100; and TAX, if gross >= 7000, tax = 15% of gross; if gross >= 4000, tax = 10% of gross, if gross >=2000, tax = 5% of gross. Then, compute for Net Income = gross + bonus – total deduction. Then, display the net income.



Write a JAVA program that will compute for the net income of a particular employee. You have to accept name, position, and number of days worked. The position has three categories: if Manager, rate per day is P500; if Supervisor, P400; if Employee, P300. Then after accepting the rate per day, compute gross = rate per day * no. of days worked, compute for the bonus, if gross is >= 8000, bonus = 1000; if gross>= 5000, bonus = 750; if gross >= 3000, bonus = 500; if less, bonus = 0; compute for the deductions: SSS is always 10% of gross; Medicare is always P100; and TAX, if gross >= 7000, tax = 15% of gross; if gross >= 4000, tax = 10% of gross, if gross >=2000, tax = 5% of gross. Then, compute for Net Income = gross + bonus – total deduction. Then, display the net income. 


Consider the following schedule of transactions



R1(A) W1(A) R2(A) W2(B) W1(B) Commit1 Commit2



Which of the following properties are true for the above schedule and justify the reason for your answer



with explanation?



a) Conflict Serializable



b) View Serializable



c) Recoverable

Consider a schedule with 4 transactions with 1, 2, 3, and 4 operations respectively. Calculate the possible



number of



a) Serial schedules



b) Non serial schedules

Consider the following relation with set of functional dependencies



R(ABCDEF)



ABC->D, ABD->E, CD->F, CDF->B, BF->D



a) Identify the candidate key(s) in the relation (with proper steps followed).



b) Identify which normal form this relation is in and reason for the answer.

Make a simple calculator using switch statement. Use 4 mathematical operations in


mathematics.


a. When you type A in the console, it will add two numbers


1


st number: 198


2


nd number: 196


b. When you type S, it will subtract two numbers.


1


st number: 145


2


nd number: 67


c. When you type D, it will divide two numbers.


1


st number: 256


2


nd number: 8


d. When you type M, it will multiply two numbers.


1


st number: 125


2


nd number: 5

Make a simple calculator using switch statement. Use 4 mathematical operations in

mathematics.

a. When you type A in the console, it will add two numbers

1

st number: 198

2

nd number: 196

b. When you type S, it will subtract two numbers.

1

st number: 145

2

nd number: 67

c. When you type D, it will divide two numbers.

1

st number: 256

2

nd number: 8

d. When you type M, it will multiply two numbers.

1

st number: 125

2

nd number: 5


How to use array to record the student profiles ?

How to Create a Student Class?



LATEST TUTORIALS
APPROVED BY CLIENTS