Java | JSP | JSF Answers

Questions answered by Experts: 3 611

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

In or Out


by CodeChum Admin



I'm quite into games now, so how about we play In or Out! When a given number is even, the team scores so we shall print "In", but if it's not an even number, then we print "Out". Simple, right?





Now let's get this game started.



Input



A line containing an integer.



35


Output



A line containing a string.



Out

In or Out



by CodeChum Admin




I'm quite into games now, so how about we play In or Out! When a given number is even, the team scores so we shall print "In", but if it's not an even number, then we print "Out". Simple, right?




Now let's get this game started.




Input




A line containing an integer.




35



Output




A line containing a string.

According to the National Heart, Lung, and Blood Institute of the National Institutes of Health, body mass index (BMI) is a measure of body fat based on height and weight that applies to adult men and women. It is used to monitor one's health by determining whether one is underweight, overweight, has normal weight or is obese. It is computed based as follows (when using standard weight in pounds and height in inches):





BMI = 703 x (weight/(height2))





Note: For this problem, you need to format the output to print the appropriate number of decimal places. You need to use System.out.format (Read: https://docs.oracle.com/javase/tutorial/java/data/numberformat.html)

We Filipinos are quite known for the habit of leaving at least one of the many pieces of food on the plate as it can't be equally divided among all at most times. Just like when 3 people decide to eat a pizza of 10 slices, there will often be at least one slice left on the box. To accurately show just how many pieces of things are left when divided by a certain number, we code it using modulo.



Care to do it for me


Q.2.1 On the form create two combo boxes, one for the country selection and another to select a town. Also, add two radio buttons for the user to select to display either a phone or postal code.

Q.2.2 You are also required to create a “submit” and “exit” button. The layout of the form is left to your discretion. Marks will be allocated to the presentation and effectiveness of the layout, but the following layout is displayed for your convenience. 16; 17; 18 2018 ©

Q.2.3 The application must allow a user to select between two countries, namely South Africa and the United Kingdom. When a particular country is selected, present the available towns in the town combo box.

SOUTH AFRICA UNITED KINGDOM Cape Town Phone Code: 021 Postal Code: 8000 London Phone Code: 020 Postal Code: WC2N5DU Johannesburg Phone Code: 011 Postal Code: 2000 Oxford Phone Code: 01865 Postal Code: OX13PN Durban Phone Code: 031 Postal Code: 4000 Southampton Phone Code: 023 Postal Code: SO147DW



Write a Java application and use a two-dimensional array that will store the three ratings of five TV shows.

SERIES NAME RATING 1 RATING 2 RATING 3 Big Bang Theory 9 8 5 Scandal 7 5 5 Modern Family 8 8 8 Dexter 10 7 8 Grand Designs 3 1 5 (6)

Q.2.2 Calculate and print the average of the TV rating for each TV show.

Q.2.3 Determine if the series will be continued for another season. If the average rating of the series is greater than or equal to seven then the TV network will continue with a new season.

Q.2.4 Print out each series name with the average rating and if there will be a series continuation.


  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



LATEST TUTORIALS
APPROVED BY CLIENTS