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

  1. LOOPS&CONDITIONS: Create a program that takes in two numbers and then calculate the sum of all even numbers in between the two numbers. The program should also calculate the products of all the odd numbers between the provided numbers.

 

Sample run 1:                                                 

Enter two numbers: 2 8                                                

Output:

Even numbers: 2 4 6 8

Odd numbers: 3 5 7

Sum of even numbers = 20

Product of odd numbers = 105

Create a program that gets values as CMD args as follows, a person's name, year of birth and gender. The program then prints a message as follows:[HINT: if the person is male then the program uses Mr otherwise use Ms]

Sample 01:

Java Lab01_Task04 John 1999 M

Output

Good Mr John, you are 21 years old


develop a java console application that either overhaul or automate it.

Implement the following java concept in your solution and highlight in your documentation or code where you did it:

1. Class and Object

2. File and Stream

3. Exception Handling


Write java application with the following information:


- Class Name ; Student


- Method1: AddStudent


- Method2: Print Students


- Method 3: totalStudent


- Method 4: Delete Student

Java Data Types Assignment?



Object [ ] = { “Java”, 1.23F, true, false, 23, ‘a’, ‘b’, 23.4F, 45.6F}; Write the Java Program to sum only the float variables or any data type.

Write a program that allows the user to input a name, surname and address. The program should output the name, surname and address 10 times. Use the For and WHILE LOOP. 

2. Write a program using the SWITCH CASE Statement to enable the user to choose from 4 different operations as listed below. 

1) Sum (+) 

2) Minus (‐) 

3) Multiplication (*) 

4) Division (/) 

5) Exit 

The user will input two numbers and will then choose the operation from the menu above. The program will then work the operation chosen by the user and display the result accordingly. Loop the whole program until the user presses ‘5’

3. Write statements that will read numbers and print out the sum of thenumbers. The program should stop when the user enters -999, or after reading 5 numbers, whichever comes first.

4. Write a program segment using nested loops to create the following

output:

 

*

**

***

****

*****

******

*******

********

*********


: complete the question in the comments


The characters don’t need to be in particular order. For example, the characters [“y”, “r”, “o”, “u”] are needed to form the words [“your”, “you”, “or”, “yo”] Note: the input words won’t contain any spaces; however, they might contain punctuation and/or special characters. Sample Input words = ["this", "that", "did", "deed", "them!", "a"] Sample Output ["t", "t", "h", "i", "s", "a", "d", "d", "e", "e", "m", "!"] Solution Instruction ● You can submit your solution in the programming language of your choice. Y


Problem Statement- Write a function that takes in an array of words and returns the smallest array of characters needed to form all of the words. The characters don’t need to be in particular order.





Sample Input words = ["this", "that", "did", "deed", "them!", "a"]





Sample Output ["t", "t", "h", "i", "s", "a", "d", "d", "e", "e", "m", "!"]



● Please don’t write any main function, focus on writing the given function. A sample function signature is given below (for Java)



class Program { public char[] minimumCharactersForWords(String[] words)


{


// Write your code here.


return new char[] {};



}



}



Write a program that contains three threads. The first reads a letter and repeats the display of lines of increasing number of that letter. The second and third threads will do the same with other letters. Run this program which executes these threads simultaneously. The program and an output of a sample run are required.


Notice :use java language +I need the program to be in one class

An Execution Sample:

A

AA

AAA

B

BB

BBB

C

CC

CCC

AAAA

AAAAA

AAAAAA

BBBB

BBBBB

BBBBBB

CCCC

CCCCC

CCCCCC


1 Context An Adapter pattern acts as a connector between two incompatible interfaces that otherwise cannot be connected directly. An Adapter wraps an existing class with a new interface so that it becomes compatible with the client’s interface.

2 Problem description In this work, you will manage a printer room. There are two printers in the printer room, one char printer and the other one for char array. Depending on the printer selected, the job will either be printed in char or according to the limit, such as a char buffer.

3 Measure of success You are expected to implement necessary classes for this example using Facade Pattern. Output should be as in the pictures.


LATEST TUTORIALS
APPROVED BY CLIENTS