Commit 105b3cc6 authored by Ieva's avatar Ieva
Browse files

Boarding Pass Updated

parent 852d4779
No preview for this file type
......@@ -67,7 +67,7 @@ public class Person {
* @return none
*/
public void setIdenNr(String idenNr) {
this.idenNr = Verifiction.verifyIdenNrORloungeCardNr(idenNr);
this.idenNr = Verifiction.verifyIdenNr(idenNr);
}
/*
* @brief Returns persons nationality
......
......@@ -19,7 +19,7 @@ public class VipPassenger extends Passenger implements INumberGenerator {
return loungeCardNr;
}
public void setLoungeCardNr(String loungeCardNr) {
this.loungeCardNr = Verifiction.verifyIdenNrORloungeCardNr(loungeCardNr);
this.loungeCardNr = loungeCardNr;
}
public int getVipNr() {
return vipNr;
......@@ -47,7 +47,4 @@ public class VipPassenger extends Passenger implements INumberGenerator {
this.vipNr = vipNrCount;
vipNrCount++;
}
}
......@@ -59,8 +59,8 @@ public class AirportService {
else {
for(AirportName names : AirportName.values()) {
if(airportName == names && capacity > 0) {
//Airport newA = new Airport(capacity, airportName);
//allAirports.add(newA);
Airport newA = new Airport(capacity, airportName);
allAirports.add(newA);
return true;
}
}
......@@ -74,7 +74,7 @@ public class AirportService {
return false;
}
public boolean addNewBoardingPassByNr(AirportName airportName, int capacity, String boardingPassNr) {
public boolean addNewBoardingPassByNr(AirportName airportName, int capacity, String idenNr) {
return false;
}
......
......@@ -26,7 +26,7 @@ public class Verifiction {
* @param text - users input text
* @return verified string that only contains only letters and digits
*/
public static String verifyIdenNrORloungeCardNr(String text) {
public static String verifyIdenNr(String text) {
String result = "";
for(int i = 0; i < text.length(); i++) {
if(Character.isLetter(text.charAt(i)) || Character.isDigit(text.charAt(i))) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment