FA1 Hands
FA1 Hands
Instructions to candidates:
1. Follow the class diagram strictly. Read the problem statement, examples and the other details
provided carefully and implement the solution
2. Code submitted with compilation errors may not get evaluated
3. DO NOT add any new method apart from the one given in the file where you write the solution
4. DO NOT alter the method name or the argument list of the method that is provided to you
5. DO NOT write codes that result in infinite loops/infinite recursive calls, because it just won’t
work!
6. The test cases provided are a subset of test cases that will be used to test your code
Guidelines:
1. You (Trainee) should not tamper/modify the default folder structure in eclipse. Any changes
done to default folder structure in eclipse will result in solution scripts not being evaluated.
2. You (Trainee) should take frequent backup of your solutions.
3. In case of system restart use the back up and retrieve features on the hands-on client to persist
your code.
4. There is no “Auto Submission” feature and hence you (Trainee) must submit the scripts
mandatorily before the closing time of the exam.
5. The verify option checks the code for structural and logical correctness as per the requirements
given in the problem statement. Please ensure that your code is structurally and logically correct
according to the given problem statement before submitting.
6. Submission must be done only once, after completing all the solutions in Eclipse. Submission on
hands on client will be considered as the end of assessment. You will not be allowed to change code
once submitted.
7. In case of any issue in submission, contact the invigilator for further steps. Wrong submissions
may lead to code not getting evaluated
NOTE: NOT adhering to the above instructions and guidelines may lead to reduction in your score
even if the code is executing without any errors
Problem Statement:
Write a Java program to calculate the billAmount(double) for customers based on the array of available
jewels availJewelArr(String []), array of price of the jewels availPriceArr(int []), array of purchased
jewels purchasedJewelsArr(String []) and array of quantity purchased purchasedQuantityArr(int []).
Assumptions:
Note:
Perform case-sensitive comparison
No need to validate assumptions
Example:
purchasedQuantityArr: {20, 7, 3}
billAmount: 27354.0
Example Explanation:
Description:
Advertise is an advertising movie shooting agency. It is popularly known for producing the creative
advertisement movies. The automation of quotation generation system is depicted in the class diagram
given below.
Class Diagram:
Notes:
Do not include any extra instance/static variables and instance/static methods in the given
classes
Case insensitive comparison is required to be done unless until specified explicitly
Do not change any value or case of the given variables.
Read notes and examples for better understanding of the logic
In the derived classes, the order of passing arguments to the constructor would be the base
class variables followed by the derived class variables
Implementation Details:
Model class:
modelRemuneration:
Constructor:
For Example: if the modelId is 43216 then the first digit, i.e. 4 would be assigned as the modelGrade
Assumption: modelId is a 5digit positive nonzero integer number, not more than 59999
validateRemunerationPerDay() :
AdMovies class:
validateNoOfDaysOfShooting() :
validateTypeOfAdMovie():
Note: Perform case-sensitive comparison
calculateQuotationAmount():
This method calculates and returns the quotationAmount as per the logic given below
Invoke validateTypeOfAdMovie(), validateNoOfDaysOfShooting() and validateRemunerationP
erDay()
Note: validateRemunerationPerDay() needs to be called from Model class
If all the above methods return true,
o Identify budget(int) and serviceCharge(double) in percentage based
on typeOfAdMovie as provided in the below table: