Club Member and Fees Management
Club Member and Fees Management
[Link]*
[Link] = memberId;
return memberId;
[Link] = memberName;
return memberName;
[Link] = memberType;
return memberType;
return membershipFees;
[Link] = memberId;
[Link] = memberName;
[Link] = memberType;
[Link]*
import [Link];
[Link]();
[Link]("Enter Name");
[Link]();
}
CreditCardValidator
[Link]*
package [Link];
public CreditCard() {
super();
[Link] = number;
return number;
[Link] = number;
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link].*;
import [Link];
//check whether the card is blocklisted and card contains only 16 digits
String msg=null;
if(validateAgainstBlocklist(card, fileName))
msg="Card is blocked";
else if(validateNumber([Link]()))
else
msg="valid card";
return msg;
if([Link]().equalsIgnoreCase(str2) || [Link]().equalsIgnoreCase(str3))
{
bol=true;
else{
bol=false;
return bol;
boolean bol=true;
if(len!=16)
bol=true;
else{
bol=false;
return bol;
// Get the blocklisted no's from the file and return list of numbers
for(int i=0;i<[Link];i++)
[Link](dig1[i]);
}
return li;
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
public SkeletonValidator() {
validateClassName("[Link]");
validateClassName("[Link]");
validateMethodSignature(
"validate:String,validateAgainstBlocklist:boolean,validateNumber:boolean,getBlockListNumbers:List","com.c
[Link]");
try {
[Link](className);
iscorrect = true;
} catch (ClassNotFoundException e) {
[Link]([Link], "You have changed either the " + "class name/package. Use the correct package "
} catch (Exception e) {
[Link]([Link], "There is an error in validating the " + "Class Name. Please manually verify that the "
return iscorrect;
try {
String[] methodSignature;
methodSignature = [Link](":");
methodName = methodSignature[0];
returnType = methodSignature[1];
cls = [Link](className);
if ([Link]([Link]())) {
foundMethod = true;
if (!([Link]().getSimpleName().equals(returnType))) {
errorFlag = true;
[Link]([Link], " You have changed the " + "return type in '" + methodName
+ "' method. Please stick to the " + "skeleton provided");
} else {
if (!foundMethod) {
errorFlag = true;
[Link]([Link], " Unable to find the given public method " + methodName
+ ". Do not change the " + "given public method name. " +
"Verify it with the skeleton");
if (!errorFlag) {
} catch (Exception e) {
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
new SkeletonValidator();
[Link](cardNumber);
//Write your code here read card numnber and create CreditCard object based on cardnumber
[Link](validationMessage);
}
ESHOPPING
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
[Link]([Link](amt));
}
[Link]*/orderService
package [Link];
import [Link];
/**
*/
/**
* Method to calculate total purchase amount for all the order line items
* @param orderLineItems
* @return totalOrderAmount
*/
double totalOrderAmount = 0;
int qt =0;
for(int i=0;i<[Link];i++){
qt = orderLineItems[i].quantity;
cost = orderLineItems[i].itemCostPerQuantity;
totalOrderAmount += (qt*cost);
/**
* @param totalOrderAmount
* @return discount
*/
if(totalOrderAmount<1000){
discount = (totalOrderAmount*10)/100;
discount = (totalOrderAmount*20)/100;
else if(totalOrderAmount>=10000){
discount = (totalOrderAmount*30)/100;
/**
* Method to verify if the order line item is flagged as Bulk Order or not
* @param lineItem
* @return boolean
*/
boolean result=false;
if([Link]>5){
result = true;
result=false;
}
/**
* @param orderLineItems
* @return
*/
int count = 0;
for(int i=0;i<[Link];i++){
if(isBulkOrder(orderLineItems[i])){
count++;
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
/**
* @author 222805
* This class is used to verify if the Code Skeleton is intact and not modified by participants thereby ensuring smooth
auto evaluation
*/
public class SkeletonValidator {
public SkeletonValidator() {
validateClassName("[Link]");
validateClassName("[Link]");
validateMethodSignature(
"calculateOrderTotalAmount:double,calculateDiscount:double,isBulkOrder:boolean,countOfBulkOrderLineIt
ems:int",
"[Link]");
try {
[Link](className);
iscorrect = true;
} catch (ClassNotFoundException e) {
[Link]([Link], "You have changed either the " + "class name/package. Use the correct package "
} catch (Exception e) {
return iscorrect;
}
protected final void validateMethodSignature(String methodWithExcptn, String className) {
try {
String[] methodSignature;
methodSignature = [Link](":");
methodName = methodSignature[0];
returnType = methodSignature[1];
cls = [Link](className);
if ([Link]([Link]())) {
foundMethod = true;
if (!([Link]().getName().equals(returnType))) {
errorFlag = true;
[Link]([Link], " You have changed the " + "return type in '" + methodName
+ "' method. Please stick to the " + "skeleton provided");
} else {
if (!foundMethod) {
errorFlag = true;
[Link]([Link], " Unable to find the given public method " + methodName
+ ". Do not change the " + "given public method name. " + "Verify it with the skeleton");
if (!errorFlag) {
} catch (Exception e) {
[Link]*
package [Link];
/**
*/
return itemId;
}
public void setItemId(String itemId){
[Link] = itemId;
return itemName;
[Link] = itemName;
return itemCostPerQuantity;
[Link] = itemCostPerQuantity;
return quantity;
[Link] = quantity;
[Link] = itemId;
[Link] = itemName;
[Link]=itemCostPerQuantity;
[Link] = quantity;
}
Fixed Deposit Details
[Link]*
import [Link].*;
class FDScheme{
super();
[Link]=schemeNo;
[Link]=depositAmt;
[Link]=period;
calculateInterestRate();
return schemeNo;
[Link]=schemeNo;
return depositAmt;
[Link]=depositAmt;
return period;
return rate;
[Link]=rate;
[Link]=(float)5.5;
[Link]=(float)6.25;
[Link]=(float)7.5;
[Link]*
import [Link];
int no=[Link]();
[Link]();
double amt=[Link]();
int prd=[Link]();
FDScheme obj=new
FDScheme(no,amt,prd);
}
GPA CALCULATION
[Link]*
package [Link];
import [Link].*;
import [Link].*;
[Link](new ArrayList<Integer>());
int option=0;
double gpa1=0;
do
option = [Link]([Link]());
switch(option)
[Link](grade);
break;
if(gpa1 > 0)
[Link]("GPA Scored");
[Link](gpa1);
else
break;
case 3 : break;
}while(option!=3);
[Link]*
package [Link];
import [Link].*;
return gradePointList;
[Link] = gradePointList;
/*This method should add equivalent grade points based on the grade obtained by the student passed as
argument into gradePointList
Grade S A B C D E
Grade Point 10 9 8 7 6 5
For example if the gradeobtained is A, its equivalent grade points is 9 has to added into the
gradePointList*/
public void addGradePoint(char gradeObtained) {
if(gradeObtained == 'S')
[Link](10);
[Link](9);
[Link](8);
[Link](7);
[Link](6);
else
[Link](5);
/* This method should return the GPA of all grades scored in the semester
For Example:
double gpa=-1;
double total=0,value=0,size=0;
size = [Link]();
if(size < 1)
return 0;
Iterator i = [Link]();
while([Link]())
value = (Integer)[Link]();
total += value;
gpa = total/size;
return gpa;
}
HUNGER EATS
[Link]*
package [Link];
return foodId;
[Link] = foodId;
return foodName;
[Link] = foodName;
return costPerUnit;
[Link] = costPerUnit;
return quantity;
[Link] = quantity;
}
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
int itemno;
String bank;
itemno=[Link]();
for(int i=0;i<itemno;i++){
[Link]([Link]());
[Link]([Link]());
[Link]([Link]());
[Link]([Link]());
[Link](fd);
}
[Link]("Enter the bank name to avail offer");
bank=[Link]();
[Link](bank);
[Link]*
package [Link];
import [Link].*;
import [Link];
return discountPercentage;
[Link] = discountPercentage;
return foodList;
[Link] = foodList;
}
//This method should set the discount percentage based on bank passed as argument
if([Link]("HDFC")){
discountPercentage=15.0;
else if([Link]("ICICI")){
discountPercentage=25.0;
else if([Link]("CUB")){
discountPercentage=30.0;
else if([Link]("SBI")){
discountPercentage=50.0;
else if([Link]("OTHERS")){
discountPercentage=0.0;
//This method should add the FoodProduct Object into Food List
List<FoodProduct> f=getFoodList();
[Link](foodProductObject);
setFoodList(f);
double bill=0;
List<FoodProduct> f=getFoodList();
for(int i=0;i<[Link]();i++){
//
// [Link]([Link](i).getCostPerUnit());
//
// [Link]([Link](i).getQuantity());
bill+=[Link](i).getQuantity()*[Link](i).getCostPerUnit()*1.0;
bill=bill-((bill*discountPercentage)/100);
return bill;
}
INSURANCE PREMIUM GENERATOR
[Link]*
package [Link];
public PropertyDetails() {
return builtUpArea;
[Link] = builtUpArea;
return builtYear;
[Link] = builtYear;
[Link] = reconstructionCost;
return householdValuation;
[Link] = householdValuation;
return burglaryCoverReqd;
[Link] = burglaryCoverReqd;
return politicalUnrestCoverReqd;
[Link] = politicalUnrestCoverReqd;
return sumAssured;
}
public void setSumAssured(Integer sumAssured) {
[Link] = sumAssured;
super();
[Link] = builtUpArea;
[Link]=builtYear;
[Link] = reconstructionCost;
[Link] = householdValuation;
[Link] = burglaryCoverReqd;
[Link] = politicalUnrestCoverReqd;
[Link]*
package [Link];
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
double amountToBePaid = 0;
double additionalAmount1=0;
double additionalAmount2=0;
* calculatePremiumForPoliticalUnrestCoverage(propertyDetails, amountToBePaid)
* else return 0;
*/
if(!validatePropertyParameters(propertyDetails)) {
return 0;
amountToBePaid=calculatePremiumByPropertyAge(propertyDetails);
additionalAmount1=calculatePremiumForBurglaryCoverage(propertyDetails, amountToBePaid);
additionalAmount2=calculatePremiumForPoliticalUnrestCoverage(propertyDetails,
amountToBePaid);
return [Link](amountToBePaid+additionalAmount1+additionalAmount2);
}
/*
* conditions to be checked
*/
return false;
return false;
return true;
//Use Constants.MIN_PREMIUM_AMOUNT
int sumAssured =
[Link]()*[Link]()+[Link](
);
[Link](sumAssured);
double premium = 0;
if(propertyAge>15) {
premium = Constants.MIN_PREMIUM_AMOUNT+([Link]()*0.35);
else if(propertyAge>=6) {
premium = Constants.MIN_PREMIUM_AMOUNT+([Link]()*0.2);
else {
premium = Constants.MIN_PREMIUM_AMOUNT+([Link]()*0.1);
return premium;
if([Link]().equalsIgnoreCase([Link])) {
return amount*.01;
return 0;
//Ex:-[Link]().equalsIgnoreCase([Link]) to check
condition
if([Link]().equalsIgnoreCase([Link])) {
return amount*.01;
return 0;
}
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
/**
* @author
* This class is used to verify if the Code Skeleton is intact and not modified by participants thereby ensuring smooth
auto evaluation
*/
public SkeletonValidator() {
validateClassName("[Link]");
validateClassName("[Link]");
validateClassName("[Link]");
validateClassName("[Link]");
validateMethodSignature(
"checkOwnerDetails:boolean,getPremiumAmount:double,validatePropertyParameters:boolean,calculatePre
miumByPropertyAge:double,calculatePremiumForBurglaryCoverage:double,calculatePremiumForPoliticalUnrestCov
erage:double","[Link]");
try {
[Link](className);
iscorrect = true;
[Link]("Class Name " + className + " is correct");
} catch (ClassNotFoundException e) {
[Link]([Link], "You have changed either the " + "class name/package. Use the
correct package "+ "and class name as provided in the skeleton");
} catch (Exception e) {
[Link]([Link],
"There is an error in validating the " + "Class Name. Please manually verify that the "
return iscorrect;
try {
String[] methodSignature;
methodSignature = [Link](":");
methodName = methodSignature[0];
returnType = methodSignature[1];
cls = [Link](className);
foundMethod = true;
if (!([Link]().getSimpleName().equals(returnType))) {
errorFlag = true;
[Link]([Link], " You have changed the " + "return type in '" +
methodName+ "' method. Please stick to the " + "skeleton provided");
} else {
if (!foundMethod) {
errorFlag = true;
[Link]([Link], " Unable to find the given public method " + methodName
+ ". Do not change the " + "given public method name. " + "Verify it with the
skeleton");
if (!errorFlag) {
} catch (Exception e) {
}
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
Integer builtUpArea = 0;
Integer builtYear=0;
Integer reconstructionCost = 0;
//read name
name = [Link]();
//read mobile
mobile = [Link]();
if([Link](name, mobile)) {
//read builtUpArea
builtUpArea = [Link]([Link]());
//read builtYear
builtYear = [Link]([Link]());
//read reconstructionCost
reconstructionCost = [Link]([Link]());
[Link](
"Do you want to include valuation of HouseHold Articles? Please provide yes/no");
//read response
if([Link]("yes")) {
//read householdValuation
householdValuation = [Link]([Link]());
burglaryCoverReqd = [Link]();
[Link]("Do you want to include Political unrest cover? Please provide yes/no");
//read politicalUnrestCoverReqd
politicalUnrestCoverReqd = [Link]();
if(premiumAmount==0.0) {
}else {
}
NUMEROLOGY NUMBER
[Link]*
import [Link];
int sum = 0;
return sum;
while ([Link]() != 1) {
string = [Link](getSum([Link](string)));
return [Link](string);
int oddCount = 0;
if ([Link](ch, 10) % 2 != 0) {
++oddCount;
}
return oddCount;
int evenCount = 0;
if ([Link](ch, 10) % 2 == 0) {
++evenCount;
return evenCount;
[Link]("Sum of digits");
[Link](getSum(num));
[Link]("Numerology number");
[Link](getNumerology(num));
[Link](getOddCount(num));
[Link](getEvenCount(num));
}
OIL STORES
[Link]*
import [Link];
[Link]=name;
[Link]=pack;
[Link]=category;
[Link]=cost;
[Link]=name;
return name;
[Link]=pack;
return pack;
[Link]=category;
return category;
}
[Link]=cost;
return cost;
float price=((qty*1000)/pack)*cost;
return price;
[Link]*
import [Link];
String n=[Link]();
int pc=[Link]();
[Link]("Enter category");
char cat=[Link]().charAt(0);
[Link]("Enter cost");
float c=[Link]();
[Link](n);
[Link](pc);
[Link](cat);
[Link](c);
float qty=[Link]();
}
PAYMENT-INHERITENCE
[Link]*
Cheque cheque=(Cheque)payObj;
if([Link]())
Cash cash=(Cash)payObj;
if([Link]())
Credit credit=(Credit)payObj;
if([Link]())
result="Payment done successfully via credit card. Remaining amount in your "+[Link]()+" card
is "+[Link]();
return result;
}
[Link]*
return cashAmount;
[Link] = cashAmount;
[Link]
import [Link].*;
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
[Link] = chequeNo;
return chequeAmount;
[Link] = chequeAmount;
return dateOfIssue;
[Link] = dateOfIssue;
[Link](date);
return ([Link]([Link]))*12+([Link]([Link]));
@Override
int months=findDifference(getDateOfIssue());
return (getChequeAmount()>=getDueAmount()&months<=6);
try{
catch(ParseException e)
[Link]();
[Link]*
return creditCardNo;
[Link] = creditCardNo;
return cardType;
[Link] = cardType;
return creditCardAmount;
super();
public Credit()
@Override
int tax=0;
boolean isDeducted=false;
switch(cardType)
tax=(int)(0.02*getDueAmount())+getDueAmount();
if(tax<=getCreditCardAmount())
setCreditCardAmount(getCreditCardAmount()-tax);
isDeducted=true;
break;
tax=(int)(0.05*getDueAmount())+getDueAmount();
if(tax<=getCreditCardAmount())
{
setCreditCardAmount(getCreditCardAmount()-tax);
isDeducted=true;
break;
tax=(int)(0.1*getDueAmount())+getDueAmount();
if(tax<=getCreditCardAmount())
setCreditCardAmount(getCreditCardAmount()-tax);
isDeducted=true;
break;
return isDeducted;
[Link]*
return dueAmount;
[Link] = dueamount;
return false;
}
[Link]*
import [Link].*;
int dueAmount=[Link]();
String mode=[Link]();
switch(mode)
int cashAmount=[Link]();
[Link](cashAmount);
[Link](dueAmount);
[Link]([Link](cash));
break;
String number=[Link]();
int chequeAmount=[Link]();
String date=[Link]();
[Link](chequeAmount);
[Link](number);
[Link](date);
[Link](dueAmount);
[Link]([Link](cheque));
break;
String cardType=[Link]();
[Link](cardType);
[Link](creditNumber);
[Link](dueAmount);
[Link]([Link](credit));
break;
default:
break;
[Link]();
}
POWER PROGRESS
[Link]*
import [Link].*;
int m=[Link]();
if(m<=0){
[Link](""+m+" is an invalid");
return;
int n=[Link]();
if(n<=0){
[Link](""+n+" is an invalid");
return;
if(m>=n){
return;
for(int i=1;i<=n;i++){
[Link]((int)[Link](m,i)+" ");
}
PRIME NUMBERS ENDING WITH 1
[Link]*
import [Link];
int last=0;
int flag = 0;
low = [Link]();
high = [Link]();
else {
int i = low;
int x = i % 10;
if (i % j != 0 && x == 1) {
flag = 1;
} else {
flag = 0;
break;
if (flag == 1 )
[Link](i);
i++;
}}}
SINGAPORE TOURISM
[Link]*
import [Link].*;
[Link]("BEACH",270);
[Link]("PILGRIMAGE",350);
[Link]("HERITAGE",430);
[Link]("HILLS",780);
[Link]("FALLS",1200);
[Link]("ADVENTURES",4500);
String pname=[Link]();
String name=[Link]();
if())
else
int nod=[Link]();
if(nod<=0)
else
if(not<=0)
else
double d=(double)[Link]([Link]());
double totalcost=d*(double)not*(double)nod;
if(totalcost>=1000)
totalcost=totalcost-((totalcost*15)/100);
}
SUBSTITUTION CYPHER TECHNIQUE
[Link]*
import [Link];
int shift = 7;
int f=0;
f=1;
alpha=(char)(alpha - shift);
decryptMessage=decryptMessage+alpha;
f=1;
alpha=(char)(alpha - shift);
decryptMessage=decryptMessage+alpha;
decryptMessage=decryptMessage+alpha;
}
if([Link]() == 0 || f == 0){
[Link](0);
[Link]("Decrpted Text:\n"+decryptMessage);
}
ZEE ZEE BANK
[Link]*
long accountNumber;
double balanceAmount;
super();
[Link]=accno;
[Link]=bal;
return accountNumber;
[Link]=accno;
return balanceAmount;
[Link]=bal;
float total=(float)(balanceAmount+depositAmt);
balanceAmount=total;
float total;
if(withdrawAmt>balanceAmount){
[Link]("Insufficient balance");
return false;
}else{
total=(float)(balanceAmount-withdrawAmt);
setBalanceAmount(total);
return true;
[Link]*
import [Link];
[Link]([Link]());
[Link]([Link]());
[Link]([Link]());
[Link]();
[Link]([Link]());
}
THE NEXT RECHARGE DATE
[Link]*
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
[Link]("Recharged date");
String date=[Link]();
String currentDate="29/10/2019";
if([Link](date)&&([Link](date,currentDate))){
[Link]("Validity days");
int days=[Link]([Link]());
if(days>0)
[Link]([Link](date,days));
else
else
String regex="^(3[01]|[12][0-9]|0[1-9])/(1[0-2]|0[1-9])/[0-9]{4}$";
Pattern pattern=[Link](regex);
Matcher matcher=[Link]((CharSequence)date);
return [Link]();
}
Date d1=[Link](date1);
Date d2=[Link](date2);
if(([Link](d2)<0)||([Link](d2)==0))
return true;
else
return false;
Calendar c=[Link]();
try{
Date mydate=[Link](date);
[Link](mydate);
[Link]([Link], days);
}catch(ParseException e){
[Link]();
String toDate=[Link]([Link]());
return toDate;
}
A New You Spa
[Link]*
super(customerId,customerName,mobileNumber,memberType,emailId);
/*[Link] = customerId;
[Link] = customerName;
[Link] = mobileNumber;
[Link] = memberType;
[Link] = emailId;*/
boolean b=true;
String s1 = [Link]();
String regex="[DIAMOND]{7}[0-9]{3}";
if([Link](regex)){
b=true;
else{
b=false;
return b;
double updateamount=purchaseAmount-discount;
return updateamount;
[Link]*
super(customerId,customerName,mobileNumber,memberType,emailId);
boolean b=true;
String s1 = [Link]();
String regex="[GOLD]{4}[0-9]{3}";
if([Link](regex)){
b=true;
else{
b=false;
return b;
double discount=purchaseAmount*0.15;
double updateamount=purchaseAmount-discount;
return updateamount;
}
[Link]*
return customerId;
[Link] = customerId;
return customerName;
[Link] = customerName;
return mobileNumber;
[Link] = mobileNumber;
return memberType;
return emailId;
[Link] = emailId;
public Members(String customerId, String customerName, long mobileNumber, String memberType, String
emailId) {
[Link] = customerId;
[Link] = customerName;
[Link] = mobileNumber;
[Link] = memberType;
[Link] = emailId;
[Link]*
super(customerId,customerName,mobileNumber,memberType,emailId);
/*customerId = customerId;
customerName = customerName;
mobileNumber = mobileNumber;
memberType = memberType;
emailId = emailId;
*/
}
public boolean validateCusomerId(){
boolean b=true;
String s1 = [Link]();
String regex="[PLATINUM]{8}[0-9]{3}";
if([Link](regex)){
b=true;
else{
b=false;
return b;
double discount=purchaseAmount*0.3;
double updateamount=purchaseAmount-discount;
return updateamount;
[Link]*
import [Link];
String cname=[Link]();
long mob=[Link]();
[Link]();
String mem=[Link]();
String email=[Link]();
double amount=[Link]();
double res=0.0;
if([Link]()){
res= [Link](amount);
[Link]("Name :"+[Link]());
[Link]("Id :"+[Link]());
[Link]("Email Id :"+[Link]());
} else if([Link]()){
res= [Link](amount);
[Link]("Name :"+[Link]());
[Link]("Id :"+[Link]());
[Link]("Email Id :"+[Link]());
} else if([Link]()){
res= [Link](amount);
[Link]("Name :"+[Link]());
[Link]("Id :"+[Link]());
[Link]("Email Id :"+[Link]());
} else{
}
BATTING AVERAGE
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
[Link](new ArrayList<>());
boolean flag=true;
while(flag)
[Link]("3. Exit");
int choice=[Link]();
switch(choice)
case 1: {
int runScored=[Link]();
[Link](runScored);
break;
case 2: {
[Link]([Link]());
break;
}
case 3: {
flag=false;
break;
[Link]*
package [Link];
import [Link];
return scoreList;
[Link] = scoreList;
//This method should add the runScored passed as the argument into the scoreList
[Link](runScored);
/* This method should return the average runs scored by the player
Average runs can be calculated based on the sum of all runScored available in the scoreList divided by the
number of elements in the scoreList.
For Example:
List contains[150,50,50]
*/
if([Link]()) {
return 0.0;
int size=[Link]();
int totalScore=0;
totalScore+=score;
}
Change The Cash
[Link]*
import [Link].*;
String a = [Link]();
if([Link]() < 3) {
return;
return;
int j = 0;
arr1[j++] = arr[i];
if(j!=0) {
[Link](arr1[i]);
return;
char b = [Link]().charAt(0);
int present = 0;
if(arr[i] == [Link](b)) {
arr[i] = [Link](b);
present = 1;
arr[i] = [Link](b);
present = 1;
if(present == 0) {
else {
[Link](arr[i]);
}
Check Number Type
[Link]*
[Link]*
import [Link];
int n=[Link]();
if(isOdd().checkNumberType(n))
[Link](n+" is odd");
else
}
Cheque Payment Process
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
connection=[Link]();
PreparedStatement statement=null;
ResultSet resultSet=null;
try {
resultSet=[Link]();
while([Link]()){
[Link]([Link]("customerNumber"));
[Link]([Link]("chequeNumber"));
[Link]([Link]("paymentDate"));
[Link]([Link]("amount"));
[Link](payment);
}
} catch (SQLException e) {
[Link]();
}finally{
try{
[Link]();
[Link]();
}catch(Exception e){
[Link]();
} }
return paymentList;
[Link]*
package [Link];
import [Link];
return customerNumber;
}
public void setCustomerNumber(int customerNumber) {
[Link] = customerNumber;
return chequeNumber;
[Link] = chequeNumber;
return paymentDate;
[Link] = paymentDate;
return amount;
[Link] = amount;
@Override
}
[Link]*
package [Link];
import [Link].*;
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
List<Payment> list=[Link]();
list2 = [Link]().filter(x->[Link]()==customerNumber).collect([Link]());
return list2;
List<Payment> list=[Link]();
list2 = [Link]().filter(x->[Link]().getYear()==(year-
1900)).sorted([Link](Payment::getAmount)).collect([Link]());
return list2;
}
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
public SkeletonValidator(){
validateClassName("[Link]");
validateMethodSignature("getAllRecord:[Link]","[Link]");
validateClassName("[Link]");
validateMethodSignature("toString:[Link]","[Link]");
validateClassName("[Link]");
validateMethodSignature("findCustomerByNumber:[Link],findCustomerByYear:[Link]","[Link].
[Link]");
validateClassName("[Link]");
validateMethodSignature("getConnection:[Link]","[Link]")
;
try {
[Link](className);
iscorrect = true;
} catch (ClassNotFoundException e) {
[Link]([Link], "You have changed either the " + "class name/package. Use the
correct package "
} catch (Exception e) {
[Link]([Link],
"There is an error in validating the " + "Class Name. Please manually verify
that the "
return iscorrect;
try {
String[] methodSignature;
methodSignature = [Link](":");
methodName = methodSignature[0];
returnType = methodSignature[1];
cls = [Link](className);
if ([Link]([Link]())) {
foundMethod = true;
if (!([Link]().getName().equals(returnType))) {
errorFlag = true;
} else {
if (!foundMethod) {
errorFlag = true;
+ ". Do not change the " + "given public method name. " +
"Verify it with the skeleton");
if (!errorFlag) {
} catch (Exception e) {
[Link]([Link],
" There is an error in validating the " + "method structure. Please manually
verify that the "
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
private DatabaseUtil() {
//ENSURE YOU DON'T CHANGE THE BELOW CODE WHEN YOU SUBMIT
try{
FileInputStream fis = null;
[Link](fis);
try {
[Link]([Link]("DB_DRIVER_CLASS"));
} catch (ClassNotFoundException e) {
[Link]();
try {
con =
[Link]([Link]("DB_URL"),[Link]("DB_USERNAME"),[Link]
y("DB_PASSWORD"));
} catch (SQLException e) {
[Link]();
catch(IOException e){
[Link]();
return con;
}
[Link](Main)*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
new SkeletonValidator();
Payment payment=null;
do{
[Link]("Select Option:");
int choice=[Link]();
switch(choice){
int number=[Link]();
if([Link]()==0){
}else{
[Link]("%15s%15s%15s%15s\n","Customer Number","Cheque Number","Payment
Date","Amount");
[Link]()
.forEach([Link]::println);
break;
int year=[Link]();
if([Link]()==0){
}else{
[Link]()
.forEach([Link]::println);
break;
case 3:[Link](0);
default:[Link]("\nWrong Choice\n");
}while(true);
}
Employee Eligibility for Promotion
[Link]*
import [Link];
import [Link];
import [Link];
import [Link];
import [Link].*;
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
//[Link]("In-time");
String fdt=[Link](formatter);
// [Link](fdt);
int no = [Link]();
String id = [Link]();
[Link](id, date);
}
int count = 0;
int val = 0;
if ([Link]().matches("(0[1-9]|[1-2][0-9]|3[0-1])/(0[1-9]|1[0-2])/[0-9]{4}"))
val++;
if (lin >= 5)
count++;
[Link]([Link]());
else
break;
}
Exam Scheduler
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link].*;
import [Link];
import [Link];
if(assessments==null || [Link]()) {
int rowsCount = 0;
try{
for(Assessment a:assessments)
[Link](1,[Link]());
[Link](2,[Link]());
[Link](3,[Link]().toString());
[Link](4,[Link]().toString());
[Link](5,[Link]().toString());
[Link](6,[Link]().toString());
int rs=[Link]();
if(rs!=-1)
rowsCount=rowsCount+1;
} catch(SQLException e){
return rowsCount;
PreparedStatement ps = [Link](sql);
[Link](1, code);
ResultSet rs = [Link]();
if([Link]()) {
[Link]([Link](1));
[Link]([Link](2));
[Link]([Link]([Link](3)));
[Link]([Link]([Link](4)));
[Link]([Link]([Link](5)));
[Link]([Link]([Link](6)));
return assessment;
}
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
@Override
String temp[]=[Link](",");
Assessment a = new
Assessment(temp[0],temp[1],[Link](temp[2]),[Link](temp[3]),[Link](temp[4]),Period.p
arse(temp[5]));
return a;
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public Assessment(String examCode, String examTitle, LocalDate examDate, LocalTime examTime, Duration
examDuration,
Period evalDays) {
super();
[Link] = examCode;
[Link] = examTitle;
[Link] = examDate;
[Link] = examTime;
[Link] = examDuration;
[Link] = evalDays;
public Assessment() {
return examCode;
[Link] = examCode;
return examTitle;
}
public void setExamTitle(String examTitle) {
[Link] = examTitle;
return examDate;
[Link] = examDate;
return examTime;
[Link] = examTime;
return examDuration;
[Link] = examDuration;
return evalDays;
[Link] = evalDays;
}
DateTimeFormatter date1=[Link]("dd-MMM-y");
DateTimeFormatter date2=[Link]("HH:mm");
LocalTime t=[Link](examDuration);
String d=[Link]("HH:mm").format(t);
LocalDate t1=[Link](evalDays);
String d1=[Link]("dd-MMM-y").format(t1);
[Link]("Title: "+examTitle);
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
//ENSURE YOU DON'T CHANGE THE BELOW CODE WHEN YOU SUBMIT
try{
[Link](fis);
[Link]([Link]("DB_DRIVER_CLASS"));
con =
[Link]([Link]("DB_URL"),[Link]("DB_USERNAME"),[Link]
y("DB_PASSWORD"));
catch(IOException e){
[Link]();
return con;
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link].*;
import [Link].*;
import [Link];
import [Link];
String line="";
list=new ArrayList<Assessment>();
while((line=[Link]())!=null)
[Link]([Link](line));
return list;
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public SkeletonValidator() {
[Link] };
testClass(assessmentClass, assessmentParams);
testClass(assessmentDAOClass, null);
testClass(funtionalClass, null);
testClass(databaseUtilClass, null);
testClass(fileUtilClass, null);
testFields(assessmentClass, assessmentFields);
try {
[Link](constructor);
} catch (ClassNotFoundException e) {
+ "Use the correct package and class name as provided in the skeleton");
} catch (NoSuchMethodException e) {
+ "Do not change the given public constructor. " + "Verify it with the
skeleton");
} catch (SecurityException e) {
[Link]([Link],
"There is an error in validating the " + className + ". " + "Please verify the
skeleton manually");
try {
[Link](field);
} catch (ClassNotFoundException e) {
+ "Use the correct package and class name as provided in the skeleton");
} catch (NoSuchFieldException e) {
[Link]([Link],
"You have changed one/more field(s). " + "Use the field name(s) as provided
in the skeleton");
} catch (SecurityException e) {
[Link]([Link],
"There is an error in validating the " + className + ". " + "Please verify the
skeleton manually");
public void testMethods(String className, String methodName, Class[] paramTypes, Class returnType) {
try {
[Link]([Link], " You have changed the " + "return type in '" + methodName
} catch (ClassNotFoundException e) {
+ "Use the correct package and class name as provided in the skeleton");
} catch (NoSuchMethodException e) {
} catch (SecurityException e) {
[Link]([Link],
"There is an error in validating the " + className + ". " + "Please verify the
skeleton manually");
}
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
new SkeletonValidator();
try {
[Link](assessments);
[Link]();
} catch (Exception e) {
[Link](e);
}
Book Details
[Link]*
import [Link];
if([Link]()==18)
int i1 = [Link](substr1);
int i2 = [Link](substr2);
//[Link](substr3);
int i3 = [Link](substr3);
if(i3>=10)
if(([Link](0)>='A'&&[Link](0)<='Z')||([Link](0)>='a'&&[Link](0)<='z'))
if(([Link](0)>='0'&&[Link](0)<='9')&&([Link](1)>='0'&&[Link](1)<='9')&&
([Link](2)>='0'&&[Link](2)<='9')&&([Link](3)>='0'&&[Link](3)<='9')&&
([Link](4)>='0'&&[Link](4)<='9'))
{
String substr6 = [Link](12,18);
if(i1==101)
else if(i1==102)
else if(i1==103)
else
[Link]("\n");
else
[Link]("\n");
else
[Link]("\n");
}
}
else
[Link]("\n");
else
[Link]("\n");
else
[Link]("\n");
}
Find Membership Category
[Link]*
return memberId;
[Link] = memberId;
return memberName;
[Link] = memberName;
return category;
[Link] = category;
super();
[Link] = memberId;
[Link] = memberName;
[Link] = category;
}
}
[Link]*
import [Link];
super();
[Link] = memberCategory;
[Link] = memberList;
return memberCategory;
[Link] = memberCategory;
}
public int getCount() {
return count;
[Link] = count;
return memberList;
[Link] = memberList;
synchronized(this)
for(Member m:memberList)
if([Link]().equals(memberCategory))
count++;
}
}
[Link]*
import [Link];
import [Link];
import [Link];
int tot=[Link]();
for(int i=0;i<[Link];i++)
str[i]=[Link]();
for(int i=0;i<[Link];i++)
String s[]=str[i].split(":");
m[i]=new Member(s[0],s[1],s[2]);
[Link](m[i]);
int tot1=[Link]();
for(int i=0;i<tot1;i++)
String s1=[Link]();
t1[i]=new ZEEShop(s1,mList);
t1[i].start();
//[Link](s1+" "+[Link]());
try {
[Link]().sleep(2000);
} catch (InterruptedException e) {
[Link]();
for(ZEEShop s:t1)
[Link]([Link]()+":"+[Link]());
}
Go Hospitals
[Link]*
public InPatient(String patientId, String patientName, long mobileNumber, String gender, double roomRent) {
super(patientId,patientName,mobileNumber,gender);
[Link]=roomRent;
return roomRent;
[Link] = roomRent;
double bill_amount;
bill_amount=(([Link]*noOfDays)+medicinalBill);
return bill_amount;
[Link]*
public OutPatient(String patientId, String patientName, long mobileNumber, String gender, double consultingFee)
{
super(patientId,patientName,mobileNumber,gender);
[Link]=consultingFee;
return consultingFee;
[Link] = consultingFee;
double bill_amount;
bill_amount=[Link]+scanPay+medicinalBill;
return bill_amount;
[Link]*
[Link] = patientId;
[Link] = patientName;
[Link] = mobileNumber;
[Link] = gender;
return patientId;
[Link] = patientId;
return patientName;
[Link] = patientName;
return mobileNumber;
[Link] = mobileNumber;
return gender;
[Link] = gender;
}
[Link]*
import [Link];
[Link]("[Link] Patient");
[Link]("[Link] Patient");
int ch=[Link]();
[Link]("Patient Id");
String id=[Link]();
[Link]("Patient Name");
String name=[Link]();
[Link]();
[Link]("Phone Number");
long num=[Link]();
[Link]("Gender");
String gen=[Link]();
if(ch==1){
[Link]("Room Rent");
double rent=[Link]();
[Link]("Medicinal Bill");
double bill=[Link]();
int days=[Link]();
else{
[Link]("Consultancy Fee");
double fee=[Link]();
[Link]("Medicinal Bill");
double medbill=[Link]();
[Link]("Scan Pay");
double pay=[Link]();
}
Grade Calculation
[Link]*
return studName;
[Link] = studName;
return result;
[Link] = result;
return marks;
[Link] = marks;
}
public GradeCalculator(String studName, int[] marks){
[Link] = studName;
[Link] = marks;
int sum = 0;
for(int i = 0;i<[Link];i++)
sum = sum+score[i];
if((400<=sum)&&(sum<=500))
[Link](getStudName()+":"+'A');
if((300<=sum)&&(sum<=399))
[Link](getStudName()+":"+'B');
if((200<=sum)&&(sum<=299))
[Link](getStudName()+":"+'C');
if(sum<200)
[Link](getStudName()+":"+'E');
[Link]*
import [Link];
import [Link];
import [Link];
int th = [Link]([Link]());
str = [Link]();
details[i]=str;
int k = 0;
arr[k++] = [Link](sp[j]);
[Link]();
try{
[Link](1000);
catch(Exception e)
[Link](e);
}
Passanger Amenity
[Link]*
import [Link];
int num,n,i,count1=0,count2=0,y;
char alpha,ch;
String n1,n2;
n=[Link]();
if(n<=0){
[Link](0);
for(i=0;i<n;i++,count1=0,count2=0){
arr1[i] =[Link]();
arr2[i]= [Link]();
num =[Link](arr2[i].substring(1,(arr2[i].length())));
alpha= arr2[i].charAt(0);
count2++;
for(ch=65;ch<84;ch++){
if(ch==alpha){
count1++;
if(count1==0){
[Link](""+alpha+" is invalid coach");
[Link](0);
if(count2==0){
[Link](0);
for(i=0;i<n;i++){
for(int j=i+1;j<n;j++){
if(arr2[i].charAt(0)==arr2[j].charAt(0)){
if(([Link](arr2[i].substring(1,(arr2[i].length()))))<([Link](arr2[j].substring(1,arr2[j].length())))){
n1=arr1[i];
n2=arr2[i];
arr1[i]=arr1[j];
arr2[i]=arr2[j];
arr1[j]=n1;
arr2[j]=n2;
else
if(arr2[i].charAt(0)<arr2[j].charAt(0))
n1=arr1[i];
n2=arr2[i];
arr1[i]=arr1[j];
arr2[i]=arr2[j];
arr1[j]=n1;
arr2[j]=n2;
}
for(i=0;i<n;i++){
String a=arr1[i].toUpperCase();
String b=arr2[i];
[Link](a+" "+b);
[Link]("");
}
Perform Calculation
[Link]*
[Link]*
import [Link];
int a = [Link]();
int b= [Link]();
return Perform_calculation;
return Perform_calculation;
return Perform_calculation;
}
float c = (float)a;
float d = (float)b;
return (c/d);
};
return Perform_calculation;
}
Query DataSet
[Link]*
@Override
String g="";
g+=("Theatre id : "+[Link]()+"\n");
g+=("Location :"+[Link]()+"\n");
g+=("Theatre id : "+[Link]()+"\n");
g+=("Location :"+[Link]()+"\n");
g+=("Query id : "+queryId+"\n");
return g;
}
public class DataSet{
return ticketCost;
ticketCost=a;
return noOfScreen;
noOfScreen=a;
return location;
location=a;
}
return theatreName;
theatreName=a;
return theatreId;
theatreId=a;
[Link]=pD;
return [Link];
[Link]=pD;
}
public DataSet getPrimaryDataSet()
return [Link];
[Link]=queryId;
[Link]=queryCategory;
return [Link];
return [Link];
[Link]*
import [Link].*;
[Link]([Link]());
[Link]([Link]());
[Link]([Link]());
[Link]([Link]());
String id2=[Link]();
// [Link](id2);
[Link](id2);
[Link]();
[Link]([Link]());
String gll=[Link]();
[Link](gll);
// [Link](gll);
// String pp=[Link]();
// [Link](pp);
[Link]([Link]());
[Link]([Link]());
[Link]();
[Link]([Link]());
[Link]([Link]());
[Link](sd);
[Link](pd);
[Link]([Link]());
}
Retrive Flight Based On Source And Destination
[Link]*
return flightId;
[Link] = flightId;
return source;
[Link] = source;
return destination;
[Link] = destination;
return noOfSeats;
[Link] = noOfSeats;
}
public double getFlightFare() {
return flightFare;
[Link] = flightFare;
super();
[Link] = flightId;
[Link] = source;
[Link] = destination;
[Link] = noOfSeats;
[Link] = flightFare;
[Link]*
import [Link];
import [Link].*;
try{
String query="SELECT * FROM flight WHERE source= '" + source + "' AND destination= '" + destination + "' ";
Statement st=[Link]();
while([Link]()){
String src=[Link](2);
String dst=[Link](3);
int noofseats=[Link](4);
double flightfare=[Link](5);
[Link]();
return flightList;
[Link]*
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link];
public class DB {
try{
[Link](fis);
[Link]([Link]("DB_DRIVER_CLASS"));
con =
[Link]([Link]("DB_URL"),[Link]("DB_USERNAME"),[Link]
y("DB_PASSWORD"));
catch(IOException e){
[Link]();
return con;
[Link]*
import [Link];
import [Link];
String source=[Link]();
String destination=[Link]();
FlightManagementSystem fms= new FlightManagementSystem();
ArrayList<Flight> flightList=[Link](source,destination);
if([Link]()){
return;
}
Silver Health Plan Insurance
[Link]
public FamilyInsurancePolicy(String clientName, String policyId, int age, long mobileNumber, String emailId) {
int count=0;
if([Link]("FAMILY"));
count++;
char ch[]=[Link]();
for(int i=6;i<9;i++)
count++;
if(count==4)
return true;
else
return false;
double amount=0;
amount=2500*months*no_of_members;
amount=5000*months*no_of_members;
else if (age>=60)
amount=10000*months*no_of_members;
return amount;
[Link]*
public IndividualInsurancePolicy(String clientName, String policyId, int age, long mobileNumber, String
emailId) {
int count=0;
if([Link]("SINGLE"));
count++;
char ch[]=[Link]();
for(int i=6;i<9;i++)
count++;
if(count==4)
return true;
else
return false;
double amount=0;
if(age>=5 && age<=25)
amount=2500*months;
amount=5000*months;
else if (age>=60)
amount=10000*months;
return amount;
[Link]*
return clientName;
[Link] = clientName;
return policyId;
[Link] = policyId;
return age;
return mobileNumber;
[Link] = mobileNumber;
return emailId;
[Link] = emailId;
public InsurancePolicies(String clientName, String policyId, int age, long mobileNumber, String emailId) {
super();
[Link] = clientName;
[Link] = policyId;
[Link] = age;
[Link] = mobileNumber;
[Link] = emailId;
[Link]*
public SeniorCitizenPolicy(String clientName, String policyId, int age, long mobileNumber, String emailId) {
int count=0;
if([Link]("SENIOR"));
count++;
char ch[]=[Link]();
for(int i=6;i<9;i++)
count++;
if(count==4)
return true;
else
return false;
double amount=0;
amount=0;
else if (age>=60)
amount=10000*months*no_of_members;
return amount;
[Link]*
import [Link];
{
Scanner sc=new Scanner([Link]);
String name=[Link]();
String id=[Link]();
int age=[Link]();
long mnum=[Link]();
String email=[Link]();
int month=[Link]();
double amount=0;
if([Link]("SINGLE"))
if([Link]())
//[Link]([Link]());
amount=[Link](month);
[Link]("Name :"+name);
[Link]("Email Id :"+email);
else
}
else if([Link]("FAMILY"))
if([Link]())
int num=[Link]();
amount=[Link](month,num);
[Link]("Name :"+name);
[Link]("Email Id :"+email);
else
else if([Link]("SENIOR"))
if([Link]())
int num=[Link]();
amount=[Link](month,num);
[Link]("Name :"+name);
[Link]("Email Id :"+email);
else
}
else
}
Travel Request System
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
import [Link];
import [Link].*;
import [Link].*;
//import [Link];
import [Link];
class DB{
//ENSURE YOU DON'T CHANGE THE BELOW CODE WHEN YOU SUBMIT
try{
[Link](fis);
[Link]([Link]("DB_DRIVER_CLASS"));
catch(IOException e){
[Link]();
return con;
/**
* @return list
*/
try{
Connection con=[Link]();
PreparedStatement ps=[Link](query);
[Link](1,sourceCity);
[Link](2,destinationCity);
ResultSet rs=[Link]();
while([Link]()){
String tid=[Link]("travelReqId");
[Link] date=[Link]("travelDate");
String apstat=[Link]("approvalStatus");
String sour=[Link]("sourceCity");
String des=[Link]("destinationCity");
double cost=[Link]("travelCost");
catch(ClassNotFoundException e){
[Link]();
catch(SQLException e ){
[Link]();
/**
* @return list
*/
double amount=0;
try{
Connection con=[Link]();
PreparedStatement ps1=[Link](query);
[Link](1,approvalStatus);
ResultSet rs1=[Link]();
while([Link]()){
amount+=[Link]("travelCost");
catch(ClassNotFoundException e){
[Link]();
}
catch(SQLException e){
[Link]();
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
/**
* @return status
*/
if([Link]("Approved")||[Link]("Pending")){
return "valid";
/**
* @return status
*/
if(){
if([Link]("Pune")|| [Link]("Mumbai")||
[Link]("Chennai")|| [Link]("Bangalore")||
[Link]("Hydrabad")){
if([Link]("Pune")||
[Link]("Mumbai")||[Link]("Chennai")||
[Link]("Bangalore")|| [Link]("Hydrabad")){
return "valid";
else{
return "invalid";
else{
return "invalid";
else{
return "invalid";
/**
* @return listOfTravelRequest
*/
if([Link](sourceCity,destinationCity).contentEquals("valid")){
return [Link](sourceCity,destinationCity);
else{
return null;
}
}
/**
* @return totalCost
*/
if([Link](approvalStatus).equals("valid")){
return [Link](approvalStatus);
else{
return -1;
[Link]*
package [Link];
import [Link];
import [Link];
import [Link];
/**
* @author t-aarti3
* This class is used to verify if the Code Skeleton is intact and not
* */
public SkeletonValidator() {
validateClassName("[Link]");
validateClassName("[Link]");
validateMethodSignature(
"validateApprovalStatus:[Link],validateSourceAndDestination:[Link],getTravelDetails:java
.[Link],calculateTotalTravelCost:double",
"[Link]");
try {
[Link](className);
iscorrect = true;
} catch (ClassNotFoundException e) {
[Link]([Link], "You have changed either the " + "class name/package. Use the
correct package "
} catch (Exception e) {
[Link]([Link],
"There is an error in validating the " + "Class Name. Please manually verify
that the "
return iscorrect;
try {
String[] methodSignature;
methodSignature = [Link](":");
methodName = methodSignature[0];
returnType = methodSignature[1];
cls = [Link](className);
if ([Link]([Link]())) {
foundMethod = true;
if (!([Link]().getName().equals(returnType))) {
errorFlag = true;
} else {
if (!foundMethod) {
errorFlag = true;
+ ". Do not change the " + "given public method name. " +
"Verify it with the skeleton");
}
if (!errorFlag) {
} catch (Exception e) {
[Link]([Link],
" There is an error in validating the " + "method structure. Please manually
verify that the "
[Link]*
package [Link];
import [Link];
// member variables
public TravelRequest() {
super();
// parameterized constructor
super();
[Link] = travelReqId;
[Link] = travelDate;
[Link] = approvalStatus;
[Link] = sourceCity;
[Link] = destinationCity;
[Link] = travelCost;
// setter, getter
/**
*/
return travelReqId;
/**
* @param travelReqId
*/
[Link] = travelReqId;
/**
*/
return travelDate;
/**
* @param travelDate
*/
[Link] = travelDate;
/**
*/
return approvalStatus;
/**
* @param approvalStatus
*/
[Link] = approvalStatus;
/**
*/
return sourceCity;
/**
* @param sourceCity
*/
[Link] = sourceCity;
/**
return destinationCity;
/**
* @param destinationCity
*/
[Link] = destinationCity;
/**
*/
return travelCost;
/**
* @param travelCost
*/
[Link] = travelCost;
[Link]*
package [Link];
import [Link].*;
import [Link].*;
import [Link];
import [Link];
import [Link];
import [Link];
new SkeletonValidator();
String sourceCity=[Link]();
String destinationCity=[Link]();
String status=[Link]();
if([Link](sourceCity,destinationCity).equals("valid")){
if([Link]()){
[Link]("No travel request raised for given source and destination cities");
else{
for(TravelRequest t:ltr){
String d=[Link]([Link]());
}
else{
if([Link](status).contentEquals("valid")){
[Link]([Link](status));
else{