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

Why does the new ArrayList() in my code errors. I don't get It. Can someone help me, its really urgent. Thanks

public static ArrayList<String> sub = new ArrayList();

public static ArrayList<String> subCourse = new ArrayList();


Find latitude and longitude of utmost 20 countries, ordered by population, with a population greater or equal to the population limit given below and have atleast one currency exclusively for themselves. (countries like Madagascar, Sri Lanka but not India, USA). Use the country details from this dataset.



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

Write a program that takes two integers as input from the keyboard, representing the number of hits and the number of at-bats for a batter in baseball. Calculate the batter’s hitting percentage and print it, then check if the hitting percentage is above 0.300. If it is, output that the player is eligible for the All Stars Game, otherwise, output that the player is not eligible.

 

Sample Input

Enter number of hits > 10

Enter number of at-bats > 40

 

Sample Output

Batters hitting percentage is : 25%

The player is not eligible for the All Stars Game

 


Julio Cesar Chavez Mark VII is an interplanetary space boxer, who currently holds the championship belts for various weight categories on many different planets within our solar system. However, it is often difficult for him to recall what his "target weight" needs to be on earth to make the weight class on other planets. Write a Java program to help him keep track of this. Create a Weight class in which you will have your main method. Perform all the inputs, calculations, and outputs in the main method.

It should ask him what his earth weight is, and to enter a number for the planet he wants to fight on. It should then compute his weight on the destination planet based on the table below:

#

Planet

Relative gravity

1. Venus: 0.78

2. Mars: 0.39

3. Jupiter: 2.65

4. Saturn: 1.17

5. Uranus: 1.05

6.Neptune: 1.23

information for the following planets:

  1. Venus 2. Mars   3. Jupiter

  4. Saturn 5. Uranus 6. Neptune

 

Which planet are you visiting? 2


Write a java program for library management system, that can be used by students, staff members and authors and librarians. the program must prompt the user authentification, the users must be able get user ID ,users must be able to borrow books or request usage of any facility within the library which should additionally be tracked by time to indicate return time or check out time in cases of facility usage. librarian must be able to add new records of books , question papers, delete books , print out records of all books, question papers, . Authors must be able to access the library books.


1.design a library management system in java .



Write an application for Furniture Company Sdn Bhd, the program determines the total price of a table. Ask the user to choose 1 for pine, 2 for oak, or 3 for mahogany and prompt the user to enter the number of a table. The output is the name of the wood chosen as well as the price of the table. Pine table cost RM100, oak tables cost RM225, and mahogany tables cost RM310. If the user enters an invalid wood code, set the price to 0. 

Furniture Company Sdn Bhd also gives an appreciation for the member card holder with 6% off from the total price. The above price is exclude government tax RM 5.60.

Save the file as Furniture.java.      



Write an application that allows the user to select from a menu a checking account (1) and a savings account (2) (The balance of these two account should be generated automatically by the program within this range 1 to 100 rand and stored into an array ). Compare the two balances and Display the message “Checking account balance is low” if the checking account balance is less than R10 do the same for the saving account. Again, display the message “Savings account balance is lower or greater then the checking account and visa versa . Save the file as Balance.java.

1. Use of a random function

2. use of an array to store the generated balance

3. use of an if statement

4 . Display of correct output


Create a java program that will count all words in a sentence. The program should have a minimum of two classes.

a) The first class should be named class1, this class will have the following:

 The main method (starting point)

 The object of class2

 Should also call the get method count_words(String str).

b) The second class should be named class2, this class should have the following:

 A constructor

 A get method named count_words(String str)

c) Construct a flowchart for class1 and class2 both combined



Write a java program that computes the area & perimeter of either a rectangle, a circle or a right-angled triangle. The program should display a menu that enables the user to select the type of figure whose area & perimeter he/she wants to compute. Depending on the users choice, the program should prompt for the dimensions and perform the computations. The output should be: - The type of figure, the dimensions, the area and the perimeter. (NB:The calculation should be for only one figure at any one time.)

using object oriented


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS