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

Make a program that will use the scanner and will output strings, int and double


ENTER FULLNAME


ENTER ADRESS


ENTER STATUS


ENTER SCHOOL NAME



ENTER FIRST NUMBER


ENTER FIFTH NUMBER



ENTER FIRST DECIMAL NUMBER


ENTER FIFTH DECIMAL NUMBER

Develop a java program to get n numbers as input and find the second duplicate and print the reverse of a number

First line contains the value n and the remaining lines contain the corresponding input

Input:

5

11

24

33

11

24

Output:

42

Note:

If the second duplicate is single digit, print as it is

If there is no second duplicate, print the first duplicate itself

If there is no duplicate, print "No duplicate found


Write a class that has three overloaded methods for calculating the areas of the following geometric shapes:

 

•    Circle

•    Rectangle

•    Cylinder

 

Here are the formulae for calculating the area of the respective shapes:


Shape: Circle

Area Formula: A = πr2

Notes: π is Math.PI and r is the circle’s radius

Shape: Rectangle

Area Formula: Area = Width * Height

Shape: Cylinder

Area Formula: Area = 2πrh + 2πr2

Notes: π is Math.PIand r is the radius of the cylinder’s base h is the cylinder’s height


  1. what does this statement print system.out.println(''bc'' + 2 + 3)

Create a class called Match that will have team objects

Data Members: This class has 2 data members named HomeTeam and VisitorTeam which will store that 2 teams that will play the Match.

Methods: This class only have one constructor which receives two Team object that will be assigned to HomeTeam and VisitorTeam, same to setTeams(),which receives two Team... playMatch(), simulates match play by calling the scoreGoals methods of each team. getPlayGound(), returns the ground of play which is the HomeGound of the HomeTeam. isDrawMatch(), will return true if the Match is a draw and false if there is a winner. The match is a draw if the goals of the teams are equal.

In the main function use your classes to create object and demonstrate their functionality. Create two team object prompt the user to enter the team name and the home ground name of each Then display the results of the match, note that the isDrawMatch method should be called to determine if match is draw and display different output


Create a "quote of the day" program. The program should read in the contents of a file containing at least 10 quotes. The program must read the quotes from the file into an array, and then randomly print one of them to the screen.



To create the text file, use Notepad or another text editor and place each quotation on a separate line. Make sure your text file is part of your project. You should also attach a seperate copy of the text file into the dropbox in case there are any issues.


Given a positive number, create an array with that number as the size and populate it with the items/names provided. Additionally, the program should print out the longest name in the array.


 consider 3 possible scenarios of input: A character, number, or word. Your program should then do the following:

  • In case the input is a character it should indicate if it’s a vowel or not
  • when a number is entered then it’s should check if it’s a prime
  • Finally, if a word is entered the system should check if it’s a palindrome or not.

. Create a program in java that takes in an input from the user and checks whether it’s a number or a word. In case a number is entered the program should print the number to the power 3 and if a word is entered your program should split that word into 2.


create a java program will concatenate the basic information of the students given the default variables name.




Hi my name is Ciara Mae Andrea L. Fajardo my birthday is on July 18, 1998 , 23 years old BSIT 1J

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS