Piano Partners is a business that teaches children how to play the piano. Only children between the ages of 5 and 17, inclusive of these ages, are eligible to be taught. The company has asked you to create an application to track the children it teaches. You decide it would be a good idea to beta test your application on a small scale before releasing it to the company. Because of this, you decide to limit the application to only support 30 children with the realization you might change this number later on.
For each child, the application must store the childs name, age, street address, phone number, and level. A valid phone number is in the format: xxx-xxx-xxxx. An example phone number is: 703-993-3565. A valid level is in the format of two values separated by one dash character. The value to the left of the dash must be a number between 1 and 4 while the value to the right of the dash must only be one of the following characters: A, B, or C. Example levels are: 1-A, 3-C, and 4-B.
Children are registered for a set number of lessons per week. They may register for up to 7 lessons per week, but must register for at least 2. All lessons take place at one of two locations: at the childs home or at a local Piano Partners studio. Lessons cannot be split across locations. That is, all lessons must be either at the childs home or at a local Piano Partners studio. Children are charged a fee of $206 per lesson. An additional $26 surcharge, per lesson, is added if the lessons are completed at a local Piano Partners studio. For example, a child that takes four lessons per week at a local Piano Partners studio will pay $928.
Lastly, there are some children that take part in piano competitions. Your application must have a way to create a competition child. A competition child contains all of the same pieces of data as a regular child does, but in addition, you must also track the total number of trophies earned by the child and a list of the names of competitions the child has competed in. Competition children must also pay a surcharge of $15 per lesson on top of all other costs. For example, a competition child that takes four lessons per week at a local Piano Partners studio will pay $988.
Create an efficient, object-oriented solution with a polished user interface that will allow a user to manage the Piano Partners business. At the start of the application, the user must be presented with a menu containing the following options:
The Add New Child option must allow the user to enter a regular child or a competition child and enter in all information about the child, including their level. For a competition child, the user must also be able to enter the number of trophies earned and a list of the names of competitions the child has competed in. However, if the user has already entered 30 children, the user should see a message indicating the beta version of the application only supports 30 children at this time.
The Print Child Information option must list all children, and prompt the user to select one child to be printed. For this child, a well-formatted report should be created, displaying the childs name, age, street address, phone number, level, number of weekly lessons, and total weekly cost. If a competition child is selected, the report must also contain the number of trophies earned and a list of competitions the child has competed in.
The Find Most Talented Child option must search only competition children and print only the name and age of the child that has earned the most trophies. If more than one child is tied for the most trophies, then all children tied must be printed.
Once a user selects any menu option other than Quit, and the option is finished executing, they should be re-prompted to enter another menu option.
Write a well-documented, efficient Java program that implements the solution design you identified. Include appropriate documentation as identified in the documentation expectations document.