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;
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.