Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

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

  1. Using a do...while() loop, continuously scan for random integers that will be inputted by the user and print out its square, separated in each line.
  2. Once the inputted value is 0, it will still print out its square value but should then terminate the loop afterwards. Use this concept in making your loop condition.

• Create a Student Class to store the profile data including: student ID, name, password, study mode, the name of course the student has registered, the current level of the programme, they have enrolled in the current term,


the module codes and names,


attendance and exam mark


Hits:


1.Create a Student class


2.Variables to store profile data


3.Use array list to record the module details


4.setter for each variable in the Student class with data validation


5.getter for each variable in the Student class


6.constructor for the Student class

Consider the association between a Country class and a Sportsperson class. Country class is defined with a name and other attributes like size, population, capital, etc, and a list of all the Sportspersons that come from it. A Sportsperson class is defined with a name and other attributes like age, height, weight, match scores (int array), number of matches played etc. Provide appropriate getters/setters and toString() method. In a real-world context, we can infer association between country and sports person that hails from that country. A Country object has-a list of Sportsperson objects that are related to it.Note that a sportsperson object can exist with his own attributes and methods, alone without the association with the country object. Similarly, a country object can exist independently without any association to a sportsperson object. In the main method make objects and print list of sportsman of the country, average scores of all sportsperson and the sportsperson who have highest scores in a match.



Parents


John is going through his family photo album. There is a total of people in the family labeled from 0 to N-1.


Find out the number of members of his family who have more than equal to X children.


Input Specification:


input1: N. denoting the total number of family members.

input2: X denoting the minimum number of children a family member should have in order to be included in John's final set.

input3: An array of N elements where the ith element denotes the parent of the ith index. If the value of the element is -1, then that family member has no parent.


Output Specification:


Your function should return the number of John's family members that have more than or equal to X childrens.


Example 1:


Input1: 1

input2:0

input3:{-1}


output:1


Explanation :Family member 0 has 0 children. As we have to return the family membersthat have more than or equal to 0 children.hence the answer is 1.


please give logic function in java for this question



Write a program to handle an exception using try, catch and throw.

Write a program to read and write data to a file.

Create an interface and design a class to implement an interface.

Create a java application to print numbers from 100 to 80 using

Runnable Interface with the sleep count of 1000.


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. 


LATEST TUTORIALS
APPROVED BY CLIENTS