11.9: Speakers' BureauWrite a program that keeps track of a speaker's bureau. The program should use a structure to store the following data about a speaker:NameTelephone NumberSpeaker TopicFee RequiredThe program should use an array of at least 10 structures. It should let the user enter data into the array, The program should have a menu-driven user interface.Input Validation: When the data for a new speaker is entered, be sure the user enters data for all the fields. No negative amounts should be entered for a speaker's fee.

Question
Asked Apr 18, 2019
212 views

11.9: Speakers' Bureau

Write a program that keeps track of a speaker's bureau. The program should use a structure to store the following data about a speaker:

Name

Telephone Number

Speaker Topic

Fee Required

The program should use an array of at least 10 structures. It should let the user enter data into the array, The program should have a menu-driven user interface.

Input Validation: When the data for a new speaker is entered, be sure the user enters data for all the fields. No negative amounts should be entered for a speaker's fee.

check_circle

Expert Answer

Step 1

We use C++ language and validate input for fees so that only integers are accepted. A struct data structure has been defined to hold the data. The program is:

 

#include <iostream>

#include <string>

#include <sstream>

using namespace std;

 

struct Speaker

{

    string name;

    string telephone;

    string topic;

    int fee;

};

 

int main()

{

    struct Speaker speakers[10];

    string dummy;

    for(int i=0; i<2;i++){ 

        cout << "Enter Full name: ";

        getline(cin,speakers[i].name);

        cout << "Enter Telephone no.: ";

        getline(cin,speakers[i].telephone);

        cout << "Enter Topic: ";

        getline(cin,speakers[i].topic);

        cout << "Enter Fee: ";

    ...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in

Engineering

Computer Science

Related Computer Science Q&A

Find answers to questions asked by student like you

Show more Q&A add
question_answer

Q: How to write a function in python where it takes a list of string s and finds the index of the longe...

A: The program has the following algorithm:Intitialize the counter counting string list position number...

question_answer

Q: Write a program called StudentTable that prints the below table. Use only print() orprintf(). DO NOT...

A: Using the given hint "printf" the below program was done in C language where "println()" is used in ...

question_answer

Q: Financial Application:• Write a program that computes future investment value at a given interest ra...

A: Program plan:Import necessary packages.Define a class named “Investment”.Define a method named “comp...

question_answer

Q: This question is for Python. Thank you!

A: The algorithm of the file would be as below:Receive the inputs as a series of input commandsConcaten...

question_answer

Q: write a program to convert between KPH and MPH in either direction. in Eclipse.If you are driving ac...

A: Hey,,,We  have to use scanner class  to get input .So we will import scanner package to access the s...

question_answer

Q: Assume the following declarations and initializations (MIN, MAX, num) are made just before each sub-...

A: 1.Program plan:Define the class.Define the “main()” function.Initialize the necessary variables.The ...

question_answer

Q: Read in 5 letters from the keyboard, reverse the order of the second and next to last letters, and p...

A: Program to reading 5 letters from the keyboards and reversing the order of the second and next to la...

question_answer

Q: Consider a 32-bit hexadecimal number stored in memory as follows: Address Value 100 2A 101 ...

A: Big-endian:Big-endian is defined as the order in which the most significant value in the sequence is...

question_answer

Q: Try giving these 2 commands $ echo cat$ cat echoExplain the differences between the output of each c...

A: echo command:echo command is used to display the line of text passed as an argument. It is a built i...