This is the Challenge called ChallengeEpicSpiesAssignment, in which you are tasked with creating an application that allows a spy agency, Epic Spies, to assign a spy to a new mission. There will be a set of business rules that you need to follow, and those will be included in the code file for this assignment.
This challenge will not require you to store the information for long-term use in a database, or any kind of storage along those lines. All it needs to do is process the information according to the provided business rules appropriately.
Your page will have the Epic Spies logo (included in the code file) at the top of your page, along with a series of controls underneath:
Note: More images and detailed instructions are included in the CS-ASP_019-Challenge folder.
The default value for the End Date Calendar should be today's date. The start date of the new assignment will be defaulted to 14 days from the current date. The projected end of the new assignment will be set to 21 days from the current date, creating a 7 day assignment.
If the assignment of the spy is successful, the user should be presented with a message determined by the business rules. The cost of hiring a spy is $500 per day, and the default duration of a mission is 7 days, giving us the following message:
Furthermore, the business rules state that if a spy is on an assignment for more than 21 days, not only will the cost be $500 per day, but an extra $1,000 bonus will be given to the spy
The final business rule states that there must be a 14 day period between the end of the previous assignment and the start of a new assignment. If this requirement is not met, the user should be presented with an error message saying, "Error: Must allow at least two weeks between previous assignment and new assignment." In addition to this, the Projected End Date should default back to 14 days from the Start Date calendar's value:
For more detailed instruction on the specific requirements for this challenge, refer to the epic-spies-business-rules.txt document located in the CS-ASP_019-Challenge folder. Also included in this folder are a few screenshots to show you what the application should look like if it is done properly.
Good luck on this challenge! If you need help, read the solution only as much as you need. It's a bit more complicated than previous challenges, but if you put together all that you've learned this far, I'm confident you can solve it.
Challenge 5 - Challenge Epic Spies Assignment