Create a frame. Place two textboxes in the frame using any appropriate layout. Then place four buttons with the button title SUM, AVERAGE, MAXIMUM and MINIMUM. If the user put two numeric values in the text fields and click any of the button, then a corresponding calculation ( sum, average, maximum or minimum) of the two inputs should be shown in a JOptionPane Message Dialogue popup. If the user mistakenly provides any non numerical values in any of the textboxes then a message "Input should be numerical. Please try again" should be shown in a JOptionPane Message Dialogue popup.
Give an example of a while loop, then provide the equivalent do-while loop and for loop. Then give a different example of a do-while loop, along with the equivalent while loop and for loop. Finally, give an example of a for loop, along with the equivalent while loop and do-while loop. Use your examples to illustrate the advantages and disadvantages of each looping structure, and describe those advantages and disadvantages
"Hello there"/10 output
Create a public class named: Employee that would get the firstname and lastname of each
employee from the keyboard/user
/** @return rear element of queue
* @return null if the queue is empty */
public Object getRearElement()
{
if (isEmpty())
return null;
else
return queue[rear];
}
/** insert theElement at the rear of the queue */
public void enqueue(Object theElement)
{
// Add your code here
}
/** remove an element from the front of the queue
* @return removed element */
public Object dequeue()
{
// Add your code here
}
please complete this java code its urgent
a) /** insert theElement at the rear of the queue */
b) /** remove an element from the front of the queue
* @return removed element */
construct uml daigram on point of sale system in java
It is advised to think carefully and identify the classes and relationships of Project and submit a UML diagram. Kindly note that each implemented class must have toString method, equals method and copy constructor.
Minimum Number of Classes: 7
Relationships: Students must have at least one inheritance, one abstract class, interface class, aggregation and composition.
Input a sentence. Find and print the shortest word. Also print number of consonants of the shortest word,
assuming only alphabets and digits are present in the word, after converting into lowercase
Implement a program in java program that lists matching products for a user who is looking for T-shirts.
you are given 3 CSV files each containing the T-shirts data fir Nike, puma and Adidas respectively. Sample CSV files links Are attached here for reference. You can add more data in existing files or can add more CSV files for another companies.
CSV FILE DATA:
ID, NAME, COLOUR, GENDER_RECOMMENDATION, SIZE, PRICE, RATING, AVAILABILITY.
Create three sub classes namely: programmer, admin and librarian to store bonus,
overtime and total salary for each employee
5) Each of the constructor in (4) should inherit the properties of Employee(using the super
keyword) and implement the EmployeeSalary interface.
6) Hide the properties from the parent class Employee using encapsulation principle.
7) Use getters and setters to make the properties in Employee visible and accessible to other
CASE STUDY: A PAYROLL SYSTEM
In this project, students are to use Java to develop a payroll software to assist in paying the salary
of employee/staff of a certain university named XYZ University. Assume we have three employees
in the university with ranks - Programmer, Admin and Librarian, write a Java program to calculate
and printout the total salary of these three employees in the institution. The program should have
the following features:
1) Create a public class named: Employee that would get the firstname and lastname of each
employee from the keyboard/user
2) Create three objects: prog, adm and lib, for programmer, admin and librarian respectively to
access the properties in Employee class.
3) Create EmployeeSalary as parent interface to store basic_sal, housing_all and
transport_all. The values for these three items are fixed for all Employee and has abstract
function calculateSalary.