Output: Course Code: CSE2008 Course Title: Programming in Java Lab Sheet 2
Output: Course Code: CSE2008 Course Title: Programming in Java Lab Sheet 2
sheet 2
1. XYZ shopping mall wants to distribute lucky coupon for its customers. Each lucky
coupon has some prize amount. The mall executive wants to pick 100 order numbers
randomly. The order number lies between 1000 and 9999. Design a java application
which helps the executive to determine the winners of lucky coupon. The customer is
winner if order number is palindrome and if it belongs to those 100 randomly picked one.
Output
The customer with order number 4224 won the lucky coupon
The customer with order number 8888 won the lucky coupon
2. Mr Ram has gathered the requirements of sports accessories for Team A and Team B
as shown below. The cost of sports accessories are given as below. Design a java
application to find the total cost of accessories for Team A and Team B separately
Team -A 12 45 15
Team -B 15 38 17
Equipment Cost
Name
Balls 9$
Bats 80$
Gloves 60$
Output
Enter the quantity of balls, bats and gloves for Team1
234
Enter the quantity of balls, bats and gloves for Team2
124
The total bill for Team A and Team B is as follows
For Team A 498
For Team B 4609
3. Mr John is working as data entry operator in company XYZ. He wants to gather the
information about the new employees joining the organization. Design a java
application to read and display the information about n employees.
Output
number
Output
5. XYZ bank wants to generate a 16 digit transaction password for the customers during
each transaction. The transaction password is constructed based on the username and
some random digits. Design a java application which generates a 16 digit transaction
password using following rule Note : Transaction Password = first half of user name
+ random digits + second half of user name and total length of Transaction Password
is 16. The entered username should not contain any blank spaces.
Output
Enter username :
reshmashet
Length of username is 11
16 digits transaction password is : resha68585mashet