· Question class. It is a class to hold the examination question details in multiple- choice question mode. This class should consist of the following details:
§ Question text (e.g. Integer data type holding how many bytes in memory?)
§ Options from A to D (e.g. A-2, B-3, C-4, D-8)
§ Actual answer (e.g. C)
Provide basic functionalities for this class.
Create a program for setup for water sort puzzle
Create a program for water sort puzzle mix up.
In Java, Write a program (in array) to take a number as input then display whether the number is equilibrium number or not.
Hint: A number will be called as equilibrium if the sum of its factors is equal to sum of its digits.
Write a program, to show the behavior of ‘try / catch block and finally’. In this, write a suitable
program to check the following scenario.
‘Allow the user to input two numbers. Divide the first number entered by the second number and
display the answer. In case, if the user enters the second number as ‘0’, program may generate a run
time exception.
Write a program, to show the behavior of ‘try / catch block and finally’. In this, write a suitable
program to check the following scenario.
‘Allow the user to input two numbers. Divide the first number entered by the second number and
display the answer. In case, if the user enters the second number as ‘0’, program may generate a run
time exception.’
Write a Java program to create a text file named ‘File1.txt.’ Write your Index Number and batch
name in two separate lines in the above file. Read the file and display the content of the text file.
Write a program to illustrate creation of threads using extending a Thread class. (start method start
each of the newly created thread. Inside the run method there is sleep() for suspend the thread for
500 milliseconds. Write the method to display your Index No 5 times using a loop as follows).
Start with 5 empty bottles. Use a random number generator to fill bottles one slot at a time with the colours while keeping 8 slots empty - there is a total of 5*4 = 20 slots - so if we will 12 slots, 8 are free for watersort puzzle
Mix up ink in water sort puzzle