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. Write a recursive function, power, that takes as parameters two integers x and y such that x is nozero and return xy. You can use the following recursive function definition to calculate xy.

               If y>= 0,

 

     1 if y=0

power(x, y) =     x if y=1

     x*power(x,y-1) if y>1

 

         if y<0,

power(x, y) = 1/power(x, -y)

 

Write a TestPower class that call addRecur method. You should provide the user to enter integer to calculate its total. The method should throw an IllegalArgumentException if it is passed a value other than integer.



Properties Of Relation (Cover Transitive, Reflective and Symmetric)

a. Embed Transitive, Reflective, and Symmetric rules into the program.

b. Write a program that read set of element and its relation. Your input data will be read from text file/console/GUI with the format below:

Input (Example): {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}

You need to create a GUI application to process your input and output.

c. Determine the properties of relation (reflexive, symmetric, transitive.....). For example the above set and relation will produce:

Output: The set properties is REFLEXIVE, SYMMETRIC, AND TRANSITIVE.

d. Your program also need to be able to generate the Transitive, Symmetric and Closure for the set and relation.

(This example is for guidance only. The actual data is necessary according to your case.


Implement BST using linked list.

Methods included:

  1. insertNode,
  2. traversal – Preorder, Postorder and Inorder Traversal
  3. total number of nodes in BST 
  4. total values of ALL NODES ( assuming all nodes contain integer values)
  5. average
  6. find min/max
  7. find height of the tree

Properties Of Relation (Cover Transitive, Reflective and Symmetric)

a. Embed Transitive, Reflective, and Symmetric rules into the program.

b. Write a program that read set of element and its relation. Your input data will be read from text file/console/GUI with the format below:

Input (Example): {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3), (4, 4)}

You need to create a GUI application to process your input and output.

c. Determine the properties of relation (reflexive, symmetric, transitive.....). For example the above set and relation will produce:

Output: The set properties is REFLEXIVE, SYMMETRIC, AND TRANSITIVE.

d. Your program also need to be able to generate the Transitive, Symmetric and Closure for the set and relation.

(This example is for guidance only. The actual data is necessary according to your case.


Implement BST using linked list.

Methods included:

  1. insertNode,
  2. traversal – Preorder, Postorder and Inorder Traversal
  3. total number of nodes in BST 
  4. total values of ALL NODES ( assuming all nodes contain integer values)
  5. average
  6. find min/max
  7. find height of the tree

Question can be found here http://ntci.on.ca/compsci/java/ch8/8_7.html

Its question 11, please don't use import.java Please use arrays and do this assignment simply, besides arrays you can make it simple. I would highly appreciate your free help.


Negative Allergy

by CodeChum Admin

Whole numbers are great, but I think we should also pay attention to decimal numbers, too.


So, how about we make a program that involves a lot of decimals?


Instructions:

  1. Continuously ask for floating point values (decimal numbers) using the do…while() loop, sum them all up, and store the total into one variable.
  2. The loop shall only terminate for the following reasons:
  3. A negative decimal number is inputted (but still included in the total sum)
  4. The total sum reaches 100.0 or more

We've had enough about numbers, so why don’t we try evaluating characters now?


If you know how to identify what the vowel letters are, and you know how to count up to 5, then you’re good to go!




Instructions:


Using a do…while() loop, continuously scan for characters (one per line) and print it out afterwards. Remember to place a space before the character's placeholder when scanning so that the newline characters will be ignored and the correct values will be scanned.

The loop shall terminate due to either of the following reasons:

The inputted character is a vowel

The number of inputted characters has already reached 5.

For all of the test cases, it is guaranteed that if the number of inputted characters is less than 5, then there must be a vowel from among the inputted characters. Also, it is guaranteed that all the characters are in lowercase.


It must also be guaranteed that if the number of inputted characters is less than 5, then there must be a vowel from among the inputted characters.


Whole numbers are great, but I think we should also pay attention to decimal numbers, too.


So, how about we make a program that involves a lot of decimals?


Instructions:

  1. Continuously ask for floating point values (decimal numbers) using the do…while() loop, sum them all up, and store the total into one variable.
  2. The loop shall only terminate for the following reasons:
  3. A negative decimal number is inputted (but still included in the total sum)
  4. The total sum reaches 100.0 or more
Use Spring MVC to do the following
1.Main page to display two Links
2.Save student exam data
3.Display all the students data
4.Student Exam Data Form would contain the following
5.Basic Student Details and Address with Validations
6.Details of Marks for Five Subjects (All marks subjects should be >= 0)
7.Save all the marks to an arraylist
8.The display Page would list all the students in decreasing order of percentage

Web Application

Main
- Link to upload student marks
- Display all the student marks

Form
Roll Number (*) -> EDYXXXX (Roll Number should start with EDY and XXXX means digits)
First Name (*)
Last Name 
Semester (*)

Marks (5 Subject)
All the marks have to be greater than or equal 0

- If validation fails please display error

Submit the form
Store it in any Collection (DB)