Java | JSP | JSF Answers

Questions answered by Experts: 3 611

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

Write a java program to throw an exception (checked) for an employee

details

a If an employee name is a number, a name exception must be

thrown

b If an employee age is greater than 50, an age exception must be

thrown. Or else an object must be created for the entered employee details.


Create an array of characters which will be initialized during run time with vowels.

If user enters any consonant, your code should generate a user-defined checked

exception, InvalidVowelException. The description or message of

InvalidVowelException is "character is consonant". Handle the exception by using

try, catch, finally, throw and throws.


Develop an application in Java for automating the Hostel Management

System using packages. Create Hostel class in pkg1, Student class, and

SRA class in pkg2. Perform menu driven operations like SRA Allocation,

List of SRA’s in a Hostel, List of Students under a particular SRA, and

View Student Details from a Test class by importing these two packages.


Create an interface “Academic” with methods: calAcademicCredit(), registerSub(),

assignFaculty(). Create another interface “NonAcademic” with method:

calNonAcademicCredit(), registerClub().

Create an abstract class called “Course” with details such as name, reg_no, subjects,

faculty, non_acad_club etc. Add necessary constructors.

Implement these interfaces and inherit the class in “Student” class to perform the specific

operations.

Demonstrate the operations in a menu driven fashion from a Main class. Write logics in

the corresponding methods.


Develop an interface called “Event” which contains Expenditure (), Prizes () are unimplemented

methods. Also include few specifications given below,

A default method called welcome_msg(),

A static method called Thank_you msg(),

Create another interface called invitation that extends Event which contains design_invitation()

as private member and display_invitation() as public method

create two customized classes called Birthday and Symposium utilize the above structure;


Q.1.8

The user must have the ability to search for a product. The user will select menu item two (2), which will prompt the user to enter a product code. If a valid product is found in the application, then display the product details to the user. If no valid product is found, display an error message to the user that the product cannot be located.

Sample Product Search Screenshot

Please enter the product code to search: 235

PRODUCT SEARCH RESULTS

PRODUCT CODE:

PRODUCT NAME:

PRODUCT WARRANTY:

PRODUCT CATEGORY: PRODUCT PRICE:

PRODUCT STOCK LEVELS:

PRODUCT SUPPLIER:

ASS

Laptop

2 years a 15000

3

IT 4 Africa

Enter (4) to launch menu or any other key to exit

Sample Invalid Product Screenshot

Please enter the product code to search: 1 The product cannot be located. Invalid Product Enter (1) to launch menu or any other key to exit
If the user makes an incorrect product category selection, prompt the user to re-enter a valid product category.

Provide the user with the option to select between the following product warranty

options:

1-Applies a six-month product warranty.

Any other key applies a two-year warranty.

Once the entire submission has been completed, the user must be informed that the

product details have been successfully saved.
The placement season has begun in a college. There are N number of students standing outside an interview room in a line. It is given that a person who goes in first has higher chances of getting selected.
Input1- an integer N, which denotes the number of students present
Input2- An array of size N, denoting the problem solving capacity of the students.

Each student has a number associated with them known as the problem-solving capability (PSC). The higher the capability, the higher the chances of selection. Now, each student wants to know the number of students ahead of him/her who have more problem-solving capability than him/her.

Find this number for each student.

Write a Java program that gets strings containing a person’s first name and last name as separate values, and then displays their “initials”, “name in address book”, and “username”. For example, if the user enters a first name of “John” and a last name “Smith”, the program should display “J.S.”, “John SMITH”, and “jsmith”.



Add a subclass named Finance_Period that will determine if a customer will pay interest or not. If the number of months to pay for the product is greater than three, the customer will pay 25% interest, else no interest applies. The maximum number of months to pay for the product is 12. Override the calculate_repayment () method by determining if the customer will pay interest or not and calculate the monthly repayment amount.


Create a class called Customer_Finance that contains the logic to test the two classes. Prompt the user for data for the first object where no interest applies and display the results; then prompt the user for data where interest is applicable and display the results.


LATEST TUTORIALS
APPROVED BY CLIENTS