⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flightunittest.java

📁 航班订座系统~java的作业
💻 JAVA
字号:
public class FlightUnitTest
{
/* This class white box tests the flight class
and black bo tests objects of the Seat class
comment out code where appropriate.
*/
public static void main (String args[])
{
Flight aFlight = new Flight(6, 4);
// Test 1: Test of constructor and setter method
// for flight details
aFlight.setFlightDetails("S345", "GLA","SYY");
aFlight.displayFlightInfo();
aFlight.displaySeatingPlan();
/*
// Test 2: Update of seating plan and free,
// reserved and booked seats
aFlight.updateSeat("1A", "Smith", 1);
aFlight.updateSeat("1B", "Brown", 2);
aFlight.updateSeat("1C", "Jones", 2);
aFlight.displayFlightInfo();
aFlight.displaySeatingPlan();
// Test 3: Change flight status to checking in
aFlight.setFlightStatus('1');
aFlight.displayFlightInfo();
// Test 4: Change flight status to boarding
aFlight.setFlightStatus('2');
aFlight.displayFlightInfo();
// Test 5: Change flight status to closed
aFlight.setFlightStatus('3');
aFlight.displayFlightInfo();
// Test 6: View the details of a seat on the flight
aFlight.updateSeat("3C", "McDonald", 2);
aFlight.viewSeat("3C");
// Test 7: View the details of a seat on the flight
// invalid seat entered
aFlight.updateSeat("3D", "Murray", 2);
aFlight.viewSeat("3Z");
*/
}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -