Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in C that will allow the user to enter and display data about a single sports athlete. The program should keep track

Write a program in C that will allow the user to enter and display data about a single sports athlete.

The program should keep track of the following quantities for a single athlete:

  • First Name A single string with a maximum of 32 characters.
  • Middle Initial A single character and can be null.
  • Last Name A single string with a maximum of 32 characters.
  • Suffix A string of at most 3 characters and can be null.
  • School A string from 2 to 64 characters.
  • State two-character abbreviation for home state (e.g. AL, SC) to be chosen from a list provided.
  • Class Two or three characters FR, SO, JR, SR, GRor RFR, RSOetc. if a Redshirt.
  • Position A string of at most 3 characters. All must be capital letters.
  • Stars An integer 0 to 5 for recruit rating. Should displays as *** for three stars, etc.
  • Age An integer from 21 to 99 years, inclusive.
  • Sex A single character, M or F.
  • Height Two integers: feet from 5 to 7, inclusive, and inches, from 0 to 11, inclusive.
  • Weight An integer from 100 to 500 pounds, inclusive.
  • Twitter Account: a string with a maximum of 15 characters. Ampersand must be first character entered and is shown when displayed, e.g. @AtheleteName)
  • Phone Number: a ten-digit number input and displayed as (444)555-6666.

Initially all quantities should be "unknown" and should display that when asked.

The program should have eight input options on its menu.

  • Enter Name
  • Enter School Information
  • Enter Age, Sex, Height, and Weight
  • Enter Contacts
  • Display the Data
  • Clear all Data
  • Quit

The program should allow the user to select any one option at a time and an error displayed if an invalid option has been chosen. The program should prompt for the appropriate data. The program should only display data if that option is selected. When it is selected, the program should print all data indicating whichif anydata is unknown.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Programming With Visual Basic .NET

Authors: Carsten Thomsen

2nd Edition

1590590325, 978-1590590324

More Books

Students also viewed these Databases questions