this is question in sofware engineering course question: The WonderCard, Ultd. c
ID: 3813864 • Letter: T
Question
this is question in sofware engineering course question:
The WonderCard, Ultd. credit card operations division has revised the criteria for granting credit limit increases to customers. The new business rules are described below. The software has not yet been developed.
The new program will read as input three data items for a customer and determine a new credit limit. The input items are the number of years as a customer, average monthly credit usage, and a credit score ( P = poor, G = good, E = excellent).
If a customer has a credit score of P no credit increase will be granted under any circumstances. Also, no credit increase will be granted to a customer who has been with WonderCard for five years or less and has a credit usage of $0 - $1,000 and a credit score of G.
A five percent increase will be given to customers who have been with WonderCard for more than five years if they have a G credit score and usage of $0 - $1,000; if they have been a customer for more than two years but not more than five years and have a credit score of G and usage greater than $1,000, or have been a customer for up to two years and have a credit score of E and usage not exceeding $1,000, or a credit score of G or E and usage greater than $1,000.
A ten percent increase will be given to customers who have been with WonderCard for more than five years and have a credit score of G and usage in excess of $1,000, or a credit score of E and usage not exceeding $1,000; or if they have been a customer for more than two years but not more than 5 years and have a credit score of E and usage in excess of $1,000.
A fifteen percent increase will be granted to only to those who have been customers for more than five years and have a credit score of E and a usage in excess of $1,000. Determine the number and types of test cases you would use to test this functional requirement, and be able to justify your results.
Explanation / Answer
public category Bird implements Animal personal AnimalDetails animalDetails;
non-public final BirdTypeEnum birdTypeEnum;
public Bird(AnimalDetails animalDetails, BirdTypeEnum birdTypeEnum)
public String move() come birdTypeEnum.move();
// come birdTypeEnum.toString() + " fly";
}
public String getVoice() come birdTypeEnum.getVoice();
}
// getters and setters toString technique
}
The Animal Details is that the merely category with name, sex, size, age. My interface has the chance of victimisation polymorphism:
public interface Animal
The BirdTypeEnum sounds like this (the same for craniate and Fish):
public enum BirdTypeEnum implements AnimalType {
Eagle, Sparrow, Pigeon;
public String move() {
switch (this) {
case Eagle:
come Eagle.toString() + " fly";
case Pigeon:
come columbiform bird.toString() + " fly";
case Sparrow:
come Sparrow.toString() + " fly";
default:
come this.toString() + " fly";
}
}
public String getVoice() {
switch (this) {
case Eagle:
come Eagle.toString() + " provides voice";
case Pigeon:
come columbiform bird.toString() + " provides voice";
case Sparrow:
come Sparrow.toString() + " provides voice";
default:
come this.toString() + " provides voice";
}
}
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.