Java | JSP | JSF Answers

Questions: 3 611

Answers by our 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 & Filtering

Create a method called emptySpace () this remove space between the name and the surname (Use a regular expression "replaceAll"). The emptySpace() method also Count the number of characters within the newly created string (nameSurname) and return the total number of Characters .

 

The total number of characters (Name and Surname) should be the size of your arrayAlphabetizer (type integer). Populate your arrayAlphabetizer with a series of random numbers between 10 and 50.

 

Display all arrayAlphabetizer elements and they are corresponding indexes before executing the sort() method and after executing the sort().

 

Allow the user to enter a value from the arrayAlphabetizer element to search for.

 

* * Loop through the array until you find the value (Use a Search function to locate the value with in the array) and replace that value with the character @.

 

 * *Print out arrayAlphabetizer with the replaced element..


Three Lines Apart

by CodeChum Admin


Do you like reading books? If you do, then you must have encountered texts that have quite a wide space with dots in between them, just like pausing or thinking before proceeding the narration. Let's try doing that here in Python, shall we?


Input


Two lines containing a string on each.


some string

another string


Output


The first line contains the first inputted string.

The next three lines contains a dot symbol on each.

The last line contains the second inputted string.


some string

.

.

.

another string


Three Lines Apart

by CodeChum Admin


Do you like reading books? If you do, then you must have encountered texts that have quite a wide space with dots in between them, just like pausing or thinking before proceeding the narration. Let's try doing that here in Python, shall we?


Input


Two lines containing a string on each.


some string

another string


Output


The first line contains the first inputted string.

The next three lines contains a dot symbol on each.

The last line contains the second inputted string.


some string

.

.

.

another string


Quite tiring to write those things separated by commas and a single space, isn't it?

Then let's try coding it instead

Five lines containing a string on each.

A single line containing all the strings separated by a comma and a space.


Have you ever answered a test question that tells you to enumerate a series of things, but the answer must be in a sentence? Quite tiring to write those things separated by commas and a single space, isn't it?

Then let's try coding it instead


write a java program that enters students names, test 1, test 2, test 3 scores and calculate average for each student " use arrays"


You will be given two integers x and y as input, you have to compute x/y . If x and y are not integers or if y is zero, exception will occur and you have to report it. You should use try and catch blocks to handle the exception. You also have to include a finally block to show output "Output from finally block". Read sample Input/Output to know what to report in case of exceptions.


10


3



3


Output from finally block




10


Hello



Check your input: java.util.InputMismatchException


Output from finally block




10





Value is undefined: java.lang.ArithmeticException: / by zero


Output from finally block




23.323





Check your input: java.util.InputMismatchException



Output from finally block

Q: Write a program that displays the following menu to the user:

Press 1 for Permanent Employee

Press 2 for Daily wages Employee

After selecting the appropriate employee calculate salary for the employees.

The daily wages employees are paid 400 per hour while permanent employees are paid 800 per hour. First you need to ask for the number of hours for which the employee has worked so far and then calculate and display the salary of each type of employee.

Perform the above-mentioned task using switch statement. 


Required Object Class and Driver Class , Write a Java program to obtain transpose of a 4 x 4 matrix. The Transpose of the matrix is obtained by exchanging the elements of each row. With the elements of the corresponding column. 


Create objec-oriented java program that will ask the user for 2 names ( boy and girl).



1. Two (2) classes -MyMainClass and Other Class


2. One (1) Constructor - set the name of the girl and boy (for object)


3. Two (2) accessors


getBoyNumLetters () & getGirlNameLetters (return numbers of letters)


4. One (1) mutator - check (to check who has the higher number of letters)



Sample output:


Enter the name of the girl: Claire


Enter the name of a boy: Christian


Claire has 6 letters of her name.


Christian has 9 letters in his name


The boy's name has more letters than the girls

LATEST TUTORIALS
APPROVED BY CLIENTS