Microsoft Visual C#
Microsoft Visual C#
7th Edition
ISBN: 9781337102100
Author: Joyce, Farrell.
Publisher: Cengage Learning,
bartleby

Videos

Textbook Question
Book Icon
Chapter 10, Problem 1CP

In Chapter 9, you created a Contestant class for the Greenville Idol competition. The class includes a contestant’s name, talent code, and talent description. The competition has become so popular that separate contests with differing entry fees have been established for children, teenagers, and adults. Modify the Contestant class to contain a field that holds the entry fee for each category, and add get and set accessors.

Extend the Contestant class to create three subclasses: ChildContestant, TeenContestant, and AdultContestant. Child contestants are 12 years old and younger, and their entry fee is $15. Teen contestants are between 13 and 17 years old, inclusive, and their entry fee is S20. Adult contestants are 18 years old and older, and their entry fee is $30. In each subclass, set the entry fee field to the correct value, and override the Tostring() method to return a string that includes all the contestant data, including the age category and the entry fee.

Modify the GreenvilleRevenue program so that it performs the following tasks:

• The program prompts the user for the number of contestants in this year’s competition, which must be between 0 and 30. The program continues to prompt the user until a valid value is entered.

• The program prompts the user for names, ages, and talent codes for the contestants entered. Along with the prompt for a talent code, display a list of valid categories. Based on the age entered for each contestant, create an object of the correct type (adult, teen, or child), and store it in an array of Contestant objects.

• After data entry is complete, display the total expected revenue, which is the sum of the entry fees for the contestants.

• After data entry is complete, display the valid talent categories and then continuously prompt the user for talent codes, and display all the data for all the contestants in each category. Display an appropriate message if the entered code is not a character or a valid code.

Blurred answer
Students have asked these similar questions
Add a list of procedures in your patient class, fill them and print them with the patient data. This is called composition which is a "has a" relationship. A patient has procedures. Write a class named Patient that has attributes for the following data: First name, middle name, and last name Address, city, state, and ZIP code Phone number Name and phone number of emergency contact The Patient class’s _ _init_ _ method should accept an argument for each attribute. The Patient class should also have accessor and mutator methods for each attribute. Next, write a class named Procedure that represents a medical procedure that has been performed on a patient. The Procedure class should have attributes for the following data: Name of the procedure Date of the procedure Name of the practitioner who performed the procedure Charges for the procedure The Procedure class’s _ _init_ _ method should accept an argument for each attribute. The Procedure class should also have accessor and mutator…
Class Design Within the backend server, we’ll have multiple classes to organize our code.  All the class descriptions are listed below.  FoodWastageRecord NOTE: You need to design this class.   It represents each food wastage entry recorded by the user through the form on the webpage (frontend).   If you notice the form on the webpage, you’ll see that each FoodWastageRecord will have the following as the data members aka member variables. Date (as string) Meal (as string) Food name (as string) Quantity in ounces (as double) Wastage reason (as string) Disposal mechanism (as string) Cost (as double) Each member variable comes with its accessor/mutator functions.   FoodWastageReport NOTE: You need to design this class.   It represents the report generated on the basis of the records entered by the user. This class will be constructed with all the records entered by the user as a parameter. It will then apply the logic to go over all the records and compute the following: Names of most…
Design a GUI for Book view class for the following Library Information System, which you have worked on 1 with the following details:   Library Item Class Design and TestingDesign a class that holds the Library Item Information, with item name, author, publisher. Write appropriate accessor and mutator methods. Also, write a tester program that creates three instances/objects of the Library Items class.    Extending Library Item Class (Library and Book Classes):  Extend the Library Item class in (1) with a Book class with data attributes for a book’s title, author, publisher and an additional attributes as number of pages, and a Boolean data attribute indicating whether there is both hard copy as well as eBook version of the book. Demonstrate Book Class in a Tester Program with an object of Book class.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Memory Management Tutorial in Java | Java Stack vs Heap | Java Training | Edureka; Author: edureka!;https://www.youtube.com/watch?v=fM8yj93X80s;License: Standard YouTube License, CC-BY