PRA Mock
PRA Mock
PRA Mock
gs/ilp1stfebsbq2
<Customer Question>
Code:
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
if(average>0){
if(answer!=null){
System.out.println("id-"+answer.getId());
System.out.println("name-"+answer.getName());
System.out.println("salary-"+answer.getSalary());
System.out.println("age-"+answer.getAge());
}
else{
sum = sum+cust[i].getSalary();
flag =1;
if(flag == 1)
else
return 0;
if(cust[i].getSalary() == searchSal){
dummy = cust[i];
return dummy;
class Customer{
this.id = id;
this.name = name;
this.salary = salary;
this.age = age;
return id;
return name;
return salary;
return age;
}
Link: https://hr.gs/ilp1stfebsbq3
Code:
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
if(average>=0){
System.out.println(average);
else
if(answer!=null){
System.out.println(answer.getTrainingRoomid());
System.out.println(answer.getTrainingRoomSystemsCount());
else
max = tr[i].getActiveSystems();
dummy = tr[i];
return dummy;
if(tr[i].getBusinessGroup().equalsIgnoreCase(bizGrp)){
sum = sum+tr[i].getTrainingRoomSystemsCount();
count++;
if(count>0){
return (double) sum/count;
else
return -1;
class TrainingRoom{
this.trainingRoomid = trainingRoomid;
this.trainingRoomSystemsCount = trainingRoomSystemsCount;
this.businessGroup = businessGroup;
this.activeSystems = activeSystems;
this.activeSystems = activeSystems;
this.faultySystems = faultySystems;
this.projectorStatus = projectorStatus;
this.desktopsCount = desktopsCount;
this.thinClientsCount = thinClientsCount;
return trainingRoomid;
}
public int getTrainingRoomSystemsCount() {
return trainingRoomSystemsCount;
return businessGroup;
return activeSystems;
return faultySystems;
return projectorStatus;
return desktopsCount;
return thinClientsCount;
}
Link: https://hr.gs/ilp1stfebsbq4
<Staff Question>
Code:
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
if(average>=0){
System.out.println(average);
else
if(answer == null){
else{
System.out.println(answer.getStaffId());
System.out.println(answer.getStaffName());
min = stf[i].getCurrentSalary();
dummy = stf[i];
return dummy;
double sum = 0;
if(stf[i].getDeptName().equalsIgnoreCase(deptName)){
count++;
}
if(count>0){
else
return -1;
class Staff{
this.staffId = staffId;
this.staffName = staffName;
this.deptName = deptName;
this.yearsOfExperience = yearsOfExperience;
this.currentSalary = currentSalary;
return staffId;
return staffName;
return deptName;
}
public float getYearsOfExperience() {
return yearsOfExperience;
return currentSalary;