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

Write a Program to create a Class Employee It contains two attributes -> Name, Salary Create 5 objects and initialize any random values for Name and Salary to it. Store all these objects in an Array and print the names of the employees sorted in Descending Order using Comparators (Use Salary to sort the elements)


by CodeChum Admin

Do you still know what being divisible by a certain number means? In case you forgot, being divisible means that the number is capable of being divided by another number without a remainder. With this knowledge, you can surely solve this problem!


Instructions:

  1. Input one integer.
  2. Make a conditional statement that contains the following conditions:
  3. If the integer is only divisible by 3, print "Divisible by 3"
  4. If the integer is only divisible by 4, print "Divisible by 4"
  5. If the integer is divisible by both 3 and 4, print "Divisible by 3 and 4"

**Using a three dimensional array***



Sample:



Enter a number of tables: 2


Enter a number of rows: 2


Enter a number of columns: 2



Enter 8 number of elements:


1


2


3


4


5


6


7


8



The biggest number among them is: 8


The smallest number among them is: 1


Then second to the biggest number is: 7

Write a java program to find the sum of all odd numbers between 1 to n - using do...while loop

  1. Create two classes—Martian and Jupiterian—that descend from Alien. Supply each with a constructor that sets the Alien data fields with values you choose. For example, you can decide that a Martian has four eyes but a Jupiterian has only two. Save the files as Martian.java and Jupiterian.java.




  1. Write a program using JCF (single java file based project with java file name as linklist) to achieve the following:  

 

Write a program that randomly stores 10 integer numbers (to start with) in a LinkedList object.  Using this LinkedList object, implement stack and queue operations using GUI as follows: Add 2 Radio Buttons for choosing options (a) Stack and (b) Queue, and 4 JButtons (Push, Pop for Stack, and Add, Delete for Queue). 

 


Given an input file, write a program that will read the file in a multidimensional dynamic array

of employee.

Sort the column employee name by applying each sorting algorithm in such a way that their

respective data in the rows is shifted with the names too, while sorting.


Create an educational program for children that distinguishes between vowels and 

consonants as the user clicks buttons. Create 26 JButtons, each labeled with a different 

letter of the alphabet. Create a JFrame to hold three JPanels in a two-by-two grid. Randomly 

select eight of the 26 JButtons and place four in each of the first two JPanels. Add a JLabel to 

the third JPanel. When the user clicks a JButton, the text of the JLabel identifies the button’s 

letter as a vowel or consonant, and then a new randomly selected letter replaces the letter 

on the JButton. Save the file as JVowelConsonant.java


Create a JFrame and set the layout to BorderLayout. In each region, place a JButton that 

displays the name of a classic movie that has the region name in its title. For example, the 

east button might indicate the movie East of Eden.When the user clicks the button, display 

the year of the movie’s release and the name of one of its stars. Save the file as 

JMovieFrame.java.


d) Write the SQL code to delete the row for the person named William Smithfield, who was hired on June 22, 2004 and whose job code classification is 500.

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS