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

Videos

Textbook Question
Book Icon
Chapter 9, Problem 1CP

In previous chapters, you have created programs for the Greenville Idol competition. Now create a Contestant class with the following characteristics:

• The Contestant class contains public static arrays that hold talent codes and descriptions. Recall that the talent categories are Singing Dancing, Musical instrument, and Other.

• The class contains an auto-implemented property that holds a contestant’s name.

• The class contains fields for a talent code and description. The set accessor for the code assigns a code only if it is valid. Otherwise, it assigns I for Invalid. The talent description is a read-only property that is assigned a value when the code is set.

Modify the GreenvilleRevenue program so that it uses the Contestant class and performs the following tasks:

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

• The expected revenue is calculated and displayed. The revenue is $25 per contestant.

• The program prompts the user for names and talent codes for each contestant entered. Along with the prompt for a talent code, display a list of the valid categories.

• After data entry is complete, the program displays the valid talent categories and then continuously prompts the user for talent codes and displays the names of all contestants in the category. Appropriate messages are displayed if the entered code is not a character or a valid code.

Blurred answer
Students have asked these similar questions
This program should be written in Java: Hamburger Joint: Hamburger ClassWrite a Hamburger class with the following six attributes: • bun - the type of bun the burger will be on • patties - the number of patties on the burger • cheese - whether or not the burger will have cheese • price - the price of the burger • toppings - an array of five toppings; it will need to start empty Write getters/setters for all attributes except the toppings array. Your constructor should create a single on white with no cheese and no toppings with a price of $2.99. Your class should include the following methods in this order, please: addCheese - this method has no parameters that adds cheese to the burger and increases the price by 75 cents superSizeIt - this method has no parameters and adds a patty to the burger and increases the price by 1.50 addToppings - this method would present the user with at least five toppings (your choice) stored in an array of String objects. If the user indicates the wants…
The fleet class includes a constructor that creates an array to store the entire fleet of Delta airlines. It also had method to read and write files, sort the array by registration number, add and remove aircraft, display the fleet and maintenance lists, update aircraft miles and maintenance , and display information about specific aircraft. Could you please explain it in Java?
The local Driver’s License Office has asked you to write a program that grades the written portion of the driver’s license exam. The exam has 10 multiple-choice questions. Here are the correct answers: 1. B 2. D 3. A 4. A 5. C 6. A 7. B 8. A 9. C 10. D A student must correctly answer 7 of the 10 questions to pass the exam. Write a class named DriverExam that holds the correct answers to the exam in an array field. The class should also have an array field that holds the student’s answers. The class should have the following methods: • passed. Returns true if the student passed the exam, or false if the student failed. • totalCorrect. Returns the total number of correctly answered questions. • totalIncorrect. Returns the total number of incorrectly answered questions. • questionsMissed. An int array containing the question numbers of the questions that the student missed, i.e. answered incorrectly. Test the class in a separate class, DriverTest , that asks the user to enter a student’s…
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
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
Program to find HCF & LCM of two numbers in C | #6 Coding Bytes; Author: FACE Prep;https://www.youtube.com/watch?v=mZA3cdalYN4;License: Standard YouTube License, CC-BY