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

Write a program in java.io package to take a name(String) and salary(double) of 15 persons then display the name and salary and also display the average salary employees are getting.


Write a program in java.io package to take a String as input then display first word all capital letters, second word all small letters, third word all capital letters and so on.

Example:

Enter a String

Asia is the largest continent

ASIA is THE largest CONTINENT


Use a two-dimensional array in the following problem. Your task is to create a simple Java program which would solve this problem. 

You MUST use a 2D array of Strings to solve this problem.

  1. Ask the user which cart of laptops they wish to book. For simplicity sake assume there are 6 laptop carts available for booking.
  2. Ask the user which period they wish to book. Assume there are 4 periods available for when they can book out laptops.
  3. Ask the user the name of the teacher who is booking and store that name into the 2D array at the appropriate location.
  4. Display the 2D array to the user in a friendly way clearly showing where the teacher has booked their laptops. I recommend initializing the 2D array at the beginning of the program so your output will be user friendly.
  5. Allow the user to loop the program and book another teacher if they wish. If the user picks a slot already used by a teacher it's ok, allow them to overwrite the existing teacher's name in that spot.

Use a two-dimensional array in the following problem. . Your task is to create a simple Java program which would solve this problem.


You MUST use a 2D array of Strings to solve this problem.


Ask the user which cart of laptops they wish to book. For simplicity sake assume there are 6 laptop carts available for booking.

Ask the user which period they wish to book. Assume there are 4 periods available for when they can book out laptops.

Ask the user the name of the teacher who is booking and store that name into the 2D array at the appropriate location.


Allow the user to loop the program and book another teacher if they wish. If the user picks a slot already used by a teacher it's ok, allow them to overwrite the existing teacher's name in that spot.


Write a function that takes an input parameter as a String. The function should replace the alternate words in it with “xyz” and print it. Words are separated by dots. (Avoid using inbuilt function) If input is “i.like.this.program.very.much” Output will be “i.xyz.this.xyz.very.xyz” in java


3. Term

by CodeChum Admin

Construct a class called Term. It is going to represent a term in polynomial expression. It has an integer coefficient and an exponent. In this case, there is only 1 independent variable that is 'x'.


more details here. Important!

https://pastebin.com/wMX2BhFk


2. Account

by CodeChum Admin

Create a new file called Account.java and construct a class called Account, which models a simple bank account. It contains the following members: 


More details here, important!

https://pastebin.com/j79JBVgp


1. Date

by CodeChum Admin

Create a new file called Date.java and construct a Date class that models a calendar date with day, month and year. It contains the following members:


more info here.

https://pastebin.com/cGAumGnt


Write a program to take a String as input then display the position of a particular character given as input using indexOf() function of String class. Don't use charAt() function.

Enter a String

Elephants are the largest mammals

Enter character to find: e

Index Position: 0 2 12 16 22

Don't use ArrayList and Character class, use String class functions if necessary


Write a program to take a String as input then display the first and last letter of each word with a condition that if it is having one character then it will remain as it is using only indexOf() function.


For example:


Enter a String


ASia is A conTinEnT


Modified: Aa is A cT


Don't use array[] and split

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS