Question: Total marks: 10 Time: 40 minutes (Answer all 2 questions. The Blue Figure indicates full marks for a question] Instructions: 1. Follow standard naming and

 Total marks: 10 Time: 40 minutes (Answer all 2 questions. The

Total marks: 10 Time: 40 minutes (Answer all 2 questions. The Blue Figure indicates full marks for a question] Instructions: 1. Follow standard naming and file convention. Don't put everything in a single file. 2. You can directly upload your .java files in LMS or zip, as you prefer. 1) You have been given a file named inp.txt. The file contains information about marvel characters where the information is written as follows: Natasha Romanoff Black Widow 35 Java Your task is to read the name, character name and age of each character and then store the information in java object. You have to define necessary java class and decide about datatype of attributes by having a look into the file. [4] 2) Write a public static method testMethod(int num). It throws an illegalParameterException if num is a negative number, else it shows if num is a multiple of 3.Call this method from the main method and handle with try-catch block. Hint: a method throws an exception based on the fact that the method body can throw exception. [6]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!