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

One way to determine how healthy a person is by measuring the body fat of the person. The formulas to determine the body fat for female and male are as follows: Body fat formula for women: A1 ¼ (Body weight  0.732) + 8.987 A2 ¼ Wrist measurement (at fullest point) / 3.140 A3 ¼ Waist measurement (at navel)  0.157 A4 ¼ Hip measurement (at fullest point)  0.249 A5 ¼ Forearm measurement (at fullest point)  0.434 B ¼ A1 + A2 – A3 – A4 + A5

Body fat ¼ body weight – B Body fat percentage ¼ body fat  100 / body weight Body fat formula for men: A1 ¼ (Body weight  1.082) + 94.42 A2 ¼ Waist measurement  4.15 B ¼ A1 – A2 Body fat ¼ body weight – B Body fat percentage ¼ body fat  100 / body weight Write a program to calculate the body fat of a person.


3. Square to the Next Level


by CodeChum Admin



We've already tried printing out the values of an array in reversed order, right? Today, we shall compute for the squares of all the numbers.





There's already a predefined array/list containing 100 integer values. Loop through each values, compute their squares, and display them.



Output



Multiple lines containing an integer.



4


9


25


10000


49


9


25


9


1


16


.


.


.

Search and Rescue



by CodeChum Admin




Make a program that will accept an integer and loop for the same number of times as that of the inputted integer and input random integers and add it to the array/list one by one, per line. Afterwards, make your program accept another random integer.




Using that final integer, compare from your array/list if the final integer's value is also present in your current array/list. If so, print "Present"; otherwise, print "None".




Start coding now!







Input




The first line contains the size of the array/list. The next lines contain the integers. The last line contains an integer to be searched.




5




3




21




2




5




23




2




Output




A line containing a string.




Present

Using ArrayList create a book borrowing system. Create ListBook.txt that list all the book information such as bookId, bookTitle, bookAuthor, bookGenre.

  • Display all the book available from ListBook.txt
  • User can search the book that want to borrow
  • count and display how many book user borrow
  • display the expected time the user should returned the book

I have to create a book borrowing system by using data structures arraylist. The system include bookId, bookTitle, bookAuthor and genre. There are booklist.txt that have book information - bookId, bookTitle, bookAuthor, genre

1.The system can search the book that user want to borrow by book id or book Title.

2. Ask if the user want to add another book.

3.Count and display the book information that user borrow and the total of the book.


Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.

  • Assume radius of earth: 6371 km
  • Round length of each line and final result to 2 decimal points
  • If co-ordinates are missing for any country use 0.000 N 0.000 E

Population limit: 28875

Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.




Your task is to find the sum of the length of all lines (in kms) that can be drawn between co-ordinates of these countries.

  • Assume radius of earth: 6371 km
  • Round length of each line and final result to 2 decimal points
  • If co-ordinates are missing for any country use 0.000 N 0.000 E

Population limit: 510713

Note: Population limit will change at random intervals. So please make sure answer is computed for the correct population limit before submitting.

Create a program that will accept the evaluation score of a faculty and determine its equivalent remarks. Print the name of the faculty and the remarks obtained. Remarks are based on the following criteria:


Score Remarks


4.50 – 5.00 Outstanding


4.00 – 4.49 Very Satisfactory


3.50 – 3.99 Satisfactory


3.00 – 3.49 Poor


2.99 below Out-of-Range

 Create a public interface Triangle, add the following method signatures:  

  • double area(): calculates and returns the area of a triangle. 
  • double perimeter(): calculates and returns the perimeter of a triangle.   

Create a public abstract class Isosceles that implements Triangle and implements following method: 

  • double perimeter(): calculates and returns the perimeter of a triangle 
  • add fields as private double longside, equalSide. Use getter() and setter() methods to access them.  

Create a public interface Right that extends Triangle, add one more method signature:  

  • double[] angles(): returns an array of measures of three interior angles.  

 

Create a public class RightIsosceles that extends Isosceles and implements interface Right:  

  • double area(): calculates and returns the area of a triangle.  
  • double[] angles(): returns an array of measures of three interior angles fields: longside, equalSide.  

Create the object of class RightIsosceles and print area, perimeter and angles of RightIsosceles triangle. 



Write a program to create a class CirclesWithException with the following information:  

radius in double with private access specifier.  

  • Use public methods setRadius() and getRadius() to access radius of the circle. setRadius() method throws an IllegalArgumentException if the argument radius is negative. 
  • Add a constructor to pass on radius of a Circle. Call setRadius() method to set the radius of circle inside the constructor. 
  • Use printRadius( ) to display the radius if object is created. 
  • Use printStackTrace() and getMessage() methods to obtain information from exception objects in corresponding catch block. 
  • Create three objects of class CirclesWithException with positive, negative and zero radius. 
LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS