Skip to content

PaDMT-USTB/AirLuggageFeeService

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AirLuggageFeeService

AirLuggageFeeService program refer to China International Airlines's baggage billing standard. According to the user’s cabin level, it provides users with functions such as inquiries about baggage billing, the number of pieces of luggage that can be carried, and the maximum weight of each piece of luggage. Each function serves as a sevice interface, the experiment of the interface feecalculation functionality provided by the test.

  1. Input specifications
parameterparameter's typerestrictiondescription
airClassintonly the number 0-30, 1, 2, 3, respectively, on behalf of the passenger's cabin level: first class, business class and economy class tickets and baby
areaint0 or 11 respectively on behalf of the domestic and international flightsWhether
isstudentbooleanIs it a student ticket
luggagedoubleTotal weight of luggage carried by the user
economicfeedoubleairfare
  1. Output specifications
    The output parameter that can be obtained by calling feeCalculation function interface is “luggagefee”, which is of double type. The charging formula is as follows:
    luggagefee = (luggage-benchmark)*economicfee*0.015,
    In the above formula, “luggagefee” is the luggage fee that should be paid by the passenger. If the passenger’s luggage is within the over-limit range, “luggagefee”=0; the benchmark is the standard amount of excess luggage, and the system will determine the specific amount according to the passenger’s cabin class and identity benchmark. Specific as shown in the table.

    Note: There is another special case that is not listed in the table. when the passenger is an international passenger and a student, benchmark value is equal to 30. Assume that all students hold economy class tickets.

airClassBenchmark
040
130
220
30
  1. Description of MRs

    According to the function of the program, 18 MRs are designed for the program. Because the value of economicfee in the program does not affect the program executed by the metamorphic relations, the value of economicfee is fixed to 1000 in the description of the MRs.

No. R Rf
1. airClass=0, isStudent=F,area=0~1,
MR1 luggage_=luggage+1,(40<=luggage<200) luggagefee_>luggagefee
MR2 luggage_=2*luggage,(40<=luggage<100) luggagefee_>=2*luggagefee
2. airClass=1, isStudent=F,area=0~1,
MR3 luggage_=luggage+1(30<=luggage<200) luggagefee_>luggagefee
MR4 luggage_=2*luggage, (30<=luggage<100) luggagefee_>=2*luggagefee
3. airClass=2, isStudent=F,area=0~1,
MR5 luggage_=luggage+1, (20<=luggage<200) luggagefee_>luggagefee
MR6 luggage_=2*luggage, (20<=luggage<100) luggagefee_>=2*luggagefee
4. airClass=3, isStudent=F,area=0~1,
MR7 luggage_=luggage+1, (0<=luggage<200) luggagefee_>luggagefee
MR8 luggage_=2*luggage, (0<=luggage<100) luggagefee_>=2*luggagefee
5. airClass=0, isStudent=T,area=0,
MR9 luggage_=luggage+1, (40<=luggage<200) luggagefee_>luggagefee
MR10 luggage_=2*luggage, (40<=luggage<100) luggagefee_>=2*luggagefee
6. airClass=1, isStudent=T,area=0,
MR11 luggage_=luggage+1, (30<=luggage<200) luggagefee_>luggagefee
MR12 luggage_=2*luggage, (30<=luggage<100) luggagefee_>=2*luggagefee
7. airClass=2, isStudent=T,area=0,
MR13 luggage_=luggage+1, (20<=luggage<200) luggagefee_>luggagefee
MR14 luggage_=2*luggage, (20<=luggage<100) luggagefee_>=2*luggagefee
8. airClass=3, isStudent=T,area=0,
MR15 luggage_=luggage+1, (0<=luggage<200) luggagefee_>luggagefee
MR16 luggage_=2*luggage, (0<=luggage<100) luggagefee_>=2*luggagefee
9. airClass=0~3, isStudent=T,area=1,
MR17 luggage_=luggage+1, (30<=luggage<200) luggagefee_>luggagefee
MR18 luggage_=0.5*luggage, (60<=luggage<200) luggagefee<=0.5*luggagefee

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%