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

Advanced Systems (AS) is a big electronics company working with electronics and hardware. They hired you to lead the new established Software Development department. The first thing you tasked to do is to increase the awareness of software development in the company. To do so, the following tasks should be conducted:

Task (1): prepare report that includes:

1. Description the steps of application development process.

2. Explanation of what an algorithm is, with examples of their use, use insertion sort or binary search as an examples.

3. Identify the steps needed to convert the insertion sort algorithm or the binary search algorithm to an executable code. Show snapshots in each step.



One form of Ohm’s law is:

E = I×R

where,

- E is applied voltage and is measured in volts(V)

- I is circuit current and is measured in amperes(A)

- R is circuit resistance and is measured in ohms(Ω)

To find E when I = 5mA and R = 2.7KΩ, first convert 5mA to 5×10-3A, 2.7KΩ to 2.7×103Ω and then perform the following calculation


E = 5×10-3A × 2.7×103Ω = 13.5V.


Create Java program that (a) creates a supporting class name, Ohm, which contains one method named, getOhm, that takes two inputs, I (circuit current) and R (circuit resistance), to return the calculation result of E= I×R, (b) create a class with “main” method in it, (c) the main method takes two double values, I and R, (d) create instance of the Ohm class and use it to call the getOhm method with the two double values (I and R) passing to the getOhm method, (e) display returned calculated value in a message box. Be sure to use ampere (A) and ohm (Ω) as units.


Submarine

Given two numbers

totalTorpedos, torpedosFired as inputs, write a super class Submarine with property and methods as below,PropertyDescription


The sequence of operations is,

  1. Submerge the Submarine
  2. Fire torpedos
  3. Surface the Submarine

Input

  • The first line of input contains a number totalTorpedos
  • The second line of input contains a number torpedosFired

Output

  • The first line of output is a string with Submarine Submerged text
  • The second line of output is a string with the number of torpedos fired and left, as shown in sample outputs
  • The third line of output is a string with Submarine Surfaced text

Sample Input 1

5

2

Sample Output 1

Submarine Submerged

2 Torpedos Fired, 3 Left

Submarine Surfaced

Sample Input 2

10

2

Sample Output 2

Submarine Submerged

2 Torpedos Fired, 8 Left

Submarine Surfaced




*Based on answer choices A-E, what is the code's output?


10. Which sample is a regular expression that accepts alphanumeric characters only?


A. [a-z0-9]

B. [a-zA-Z0-9]

C. [A-Z0-9]

D. [a-zA-Z]?[0-9]

E. [a-zA-Z]?(0-9)


*Based on answer choices A-E, what is the code's output?


9. Which can check if the letter "a" occurs n times only?


A. a?

B. a+

C. a=

D. a{n}

E. a(n)


*Based on answer choices A-E, what is the code's output?


8. Which of the following can match a, b, or c?


A. [abc]

B. [-abc]

C. [?abc]

D. [*abc]

E. [^abc]


*Based on answer choices A-E, what is the code's output?


6. Given the following code, the output is __.


String str = "Java";

System.out.print(str.concat("programming"));


A. Java programming

B. Javaprogramming

C. Java programming !

D. Javaprogramming!

E. !


*Based on answer choices A-E, what is the code's output?


4. Given the following code, the output is __.


String str = new String("persistent");

System.out.print(str.indexOf('e'));

A. 0

B. 1

C. 2

D. 3

E. 4


*Based on answer choices A-E, what is the code's output?


2. Given the following code, the output is __.


String str1 = new String("Apple");

String str2 = "Apple";

System.out.print(str1.equals(str2));


A. 0

B. 1

C. false

D. true

E. str2


Write a program that reads and records magazine sales for 5 students. Record a

student’s name, the magazine sold, and the number sold. Information should be read

in one record at a time – that is to say, read one student, magazine, and number before

getting the next set. (Similar to the example in the notes.) Produce a table that

displays the recorded information.

Note: use multiple arrays


LATEST TUTORIALS
APPROVED BY CLIENTS