Write a simulation program for the fruit market. The farmer will be able to
produce different types of fruits (apple, orange, grape, and watermelon),
and put them in the market to sell. The market has limited capacity and
farmers have to stand in a queue if the capacity is exceeded to sell their
fruits. Consumers can come to the market any time and purchase their
desired fruits; and if the fruits they want to buy runs out, they are willing to
wait until the supply of that kind is ready. (Hint: implementing this market
will encounter the producer and consumer problem, and it probably needs
multiple buffers for different kinds of fruits).
Write a program called ReverseHello.java that creates a thread (let's call it
Thread 1). Thread 1 creates another thread (Thread 2); Thread 2 creates
Thread 3; and so on, up to Thread 50. Each thread should print "Hello from
Thread <num>!", but you should structure your program such that the
threads print their greetings in reverse order.
Write a menu driven program in Java to automate the ATM operations by
demonstrating the concepts of interfaces. And create custom exceptions to
deal with the following situations
a. Invalid PIN number is entered more than 3 times
b. Withdraw operation when balance amount < withdraw amount
Write a program to implement the Library Information System using
packages with the following instructions
a) Create a Books class in pkg1.
b) Create an Admin class in pkg2.
c) Create a User class in pkg3.
d) Import all packages in Test class and do the following operations in a menu-driven
fashion. Add books, Search books, and List books.
Develop an application in Java for automating the Banking Operations using interfaces.
Create an interface called “Transaction” which contains the functions such as deposit,
withdraw, and viewBalance. Create another interface called “Displayable” which
contains the Display () function to display the account details.
Create an abstract class called “Account” with bank account details such as acc_name,
acc_no, and balance. Add necessary constructors.
Create a “Bank” class which implements the “Transaction”, “Displayable” interfaces
and inherits “Account” class.
Perform menu driven operations like Deposit, Withdraw and Balance Enquiry, View
Account Details from a Main class. Write logics in the corresponding methods.
Write a menu driven application to maintain the smart phone technical specifications
for various brands using JAVA. Use constructors, getter and setter functions. Your
application must contain the following functionalities.
For each mobile your application must maintain the details such as productName,
operatingSystem, displaySize, memory, etc.
Get the product details from admin
In the menu give the user options to add, edit, delete or display the smart phone details
Write a Java program that will create a report to display the top three mobile device sales per month from January to March 2018. The rows and columns represent the monthly sales of each device. JAN FEB MAR TOTAL IPhone 7 30 15 35 80 Samsung S8 20 25 30 75 Huawei Mate 10 25 11 32 68 MONTHLY TOTAL 75 51 97 Using a Two-Dimensional array, produce the monthly mobile device sales report and the total sales for each device
Write a Java program that will create a report to display the top three mobile device sales per month from January to March 2018. The rows and columns represent the monthly sales of each device. JAN FEB MAR TOTAL IPhone 7 30 15 35 80 Samsung S8 20 25 30 75 Huawei Mate 10 25 11 32 68 MONTHLY TOTAL 75 51 97 Using a Two-Dimensional array, produce the monthly mobile device sales report and the total sales for each device
Create a Java program to find which word has the maximum occurrence and
replace that word by a special symbol, say *.
Write a java program where a user enters and stores the average monthly rainfall figures (int) for three (3) towns over a year. The rows represent the months, and the columns represent the towns.
Calculate and print the total rainfall figures for each town, and the average rainfall for each month. Use a switch statement to print out the month name according to the column subscript value (E.g. if col = 0, then print January, col = 1 then print February, etc.) with the corresponding total alongside it.