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.Create a Registration Form by using the following instructions:

Step 1: Create a Registration Form using Java Swing

a. Import Necessary Packages

b. Create a Frame using JFrameclass

c. Set Background color of the JFrame

d. Create JLabelfor Heading Text

e. Create a JLabel and JTextField for the name.

f. Create a JLabel and JTextField for Father’s Name

g. Create JLabel and JRadioButton for Gender

h. Create JLabel and JComboBox for Date of Birth

i. Create a JLabel and JTextArea for the Address

j. Create JLabel and JTextField for the Phone

k. Create JLabel and JTextField for the Email

l. Create a JCheckBox for Accepting License Agreement

m. Creating a JButton to Submit the Value

n. Change Font Style and Size for all the Components

o. Add all Components to the Container

p. Create a JTextArea for Output

Step 2: Add ActionListener to the Button

Add ActionListener on the Submit Button

Step 3: Read the value on the Registration Form

Read and display the value on the Registration form


Implement a simple chat system using Socket Programming (TCP Sockets).

a) your chat system includes two types of components

i) A chat room and

ii) The client

b) System contains maximum 3 clients, each can enter or leave the system at any time and one can design GUI as given in Figure.

c) Chat room is long lived 'server' component and there is no GUI at server side.

d) All messages are to be broadcasted to all clients connected to the chat room.


[ Please write the reason for writing that line at the end of each line in the form of comments ]


Bob has an array of size n. He loves to play with these n numbers. Each time he plays with them, he picks up any two consecutive numbers and adds them. On adding both the numbers, it costs him k*(sum of both number). Find the minimum cost of adding all the numbers in the array.


Create a class called time that has separate int member data for hours, minutes and seconds. One constructor should initialize this data to 0, and another should initialize it to fixed values. Another member function should display it, in 11:59:59 format. The final member function should add two objects of type time passed as arguments.
A main () program should create two initialized time objects (should they be const?) and one that isn't initialized. Then it should add the two initialized values together, leaving the result in the third variable. Finally it should display the value of this variable. Make appropriate member functions const

Write a program that uses while loops and perform the following steps:

1) Prompt the user to input two integers: start and end (start must be less than end).

2) Output the average of the even numbers between start and end.


Dumbledore's Luncheon

Dumbledore is hosting a luncheon at Hogwarts, and Ron is incharge of the sitting plans.

Dumledore’s dining table can be thought of as an infinite row of seats with Dumbledore at one

end. Each of Dumbledore’s guests represents a character of English alphabet (a to z).

Dumbledore wants his guests to be seated such that the resulting string formed from the

alphabets should be lexicographically smallest (See examples for reference). He didn’t tell Ron

the total number of guests coming, but he will ask Ron to close the gate once all the guests

arrive (marking the end of incoming guests).

The rules of seating are as follows:

● Seats are allotted in sequential order, a guest who arrives later must be further from

Dumbledore than a guest who arrives earlier.

● An incoming guest must be assigned a seat, as soon as he arrives. He will take a seat.


we wish to store a large set of keyed data items where each item's key is the name of a ship Let's call this data item a Ship.

Each Ship item also stores numerous other data fields beside, ship's name which describes other properties of the ship, such as the number of sacks of grain that can be stored in the ship hold, the number of sacks currently in the ship hold, a list of the names of each member of the crew and their percentage share of the booty.


further suppose that the captain, does not keep all of his ships clustered together

in a single group in order to avoid detection. Instead, the captain keeps his ships grouped into multiple separate groups of ships called task forces.

Task 2)

Assume that primary purpose for storing these Ship keyed data items is to be able

to look up which task force a ship is in. In own words,


tell advantages and disadvantages (if any) for each JAVA ADTs

. Hash table

. Graph

. AVL Tree/BST tree

. Union-find/Disjointed data


which ADTs is best choice for this purpose, why.


As a programmer you must be able to follow precise instructions. You will also not always get precise instructions. You must learn to ask questions and make valid deductions of what is expected. Code the StudentAccount class according to the class diagram Methods explanation:  pay(double): double  This method is called when a student pays an amount towards outstanding fees. The balance is reduced by the amount received. The updated balance is returned by the method. addFees(double): double This method is called to increase the balance by the amount received as a parameter.


Implement a simple chat system using Socket Programming (TCP Sockets).

a) your chat system includes two types of components

i) A chat room and ii) The client

b) System contains maximum 3 clients, each can enter or leave the system at any time and one can design GUI as given in Figure.

c) Chat room is long lived 'server' component and there is no GUI at server side.

d) All messages are to be broadcasted to all clients connected to the chat room.


Create a Registration Form by using the following instructions: 

Step 1: Create a Registration Form using Java Swing

a. Import Necessary Packages

b. Create a Frame using JFrameclass

c. Set Background color of the JFrame

d. Create JLabelfor Heading Text

e. Create a JLabel and JTextField for the name.

f. Create a JLabel and JTextField for Father’s Name g. Create JLabel and JRadioButton for Gender

h. Create JLabel and JComboBox for Date of Birth

i. Create a JLabel and JTextArea for the Address

j. Create JLabel and JTextField for the Phone

k. Create JLabel and JTextField for the Email

l. Create a JCheckBox for Accepting License Agreement

m. Creating a JButton to Submit the Value

n. Change Font Style and Size for all the Components

o. Add all Components to the Container

p. Create a JTextArea for Output

Step 2: Add ActionListener to the Button Add ActionListener on the Submit Button

Step 3: Read the value on the Registration Form Read and display the value on the Registration form


LATEST TUTORIALS
APPROVED BY CLIENTS