Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

SIKSHAPATH

SIKSHAPATH Logo SIKSHAPATH Logo

SIKSHAPATH Navigation

  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Contact
  • Delivery Policy for Sikshapath
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Questions
  • Blog
    • Computer Science(CSE)
    • NPTEL
    • Startup
  • Contact
  • Delivery Policy for Sikshapath
Home/Questions/Q 18551
Next
Answered
Hacker
  • 0
Hacker
Asked: June 10, 20222022-06-10T00:07:35+05:30 2022-06-10T00:07:35+05:30In: C++

A Tourist Attraction Calculation System Silver Express Theme Park (SETP) …

  • 0

A Tourist Attraction Calculation System Silver Express Theme Park (SETP) Pvt Ltd is a tourist attraction that offers three types of tickets:

  1. Regular adult tickets at R30 per person.
  2. Student tickets at R25 per person.
  3. Family ticket for two adults and two children is R75, with an additional R15 for each child beyond two children.

They have approached you as a C++ developer to develop a C++ application that would help to calculate the total price of tickets.

 

  1. The program should display a menu with three options.                                (3 Marks)
  2. The program should ask the user to select the type of tickets needed. If the first or second option are selected, the program should ask the user to enter the number of people in the group. However, if the third option is selected, the program should ask the user to enter the number of additional children in the group.                                                 (13 Marks)
  3. The program should then calculate the total amount due and display it on the screen. (8 Marks)

d. Make sure that the user cannot select invalid options in the menu and that the number of people in the group is always greater than 0.

  • 1 1 Answer
  • 66 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    1 Answer

    • Voted
    • Oldest
    • Recent
    1. Best Answer
      ADMIN 2
      2022-06-10T12:17:23+05:30Added an answer on June 10, 2022 at 12:17 pm
      This answer was edited.

      Code:

      #include <iostream>
      
      using namespace std;
      
      int main(void)
      
      {
      
      int choice;
      
      cout<<"\n Silver Express Theme Park Pvt. Ltd.";
      
      cout<<"\n===========================";
      
      cout<<"\n 1.Regular Adult";
      
      cout<<"\n 2. Student";
      
      cout<<"\n 3.Family Ticket";
      
      cout<<"\n Enter the type of ticket which you want: ";
      
      cin>>choice; //input taking
      
      if(choice==1){ //adult tickets total amount calculation
      int count;
      cout<<"Enter no.of persons:";
      cin>> count;
      if(count>0)
      cout<<"Total amount due is :"<< count*30;
      else
      cout<<"no.of persons must be greater than zero";
      }
      else if(choice==2){ //student tickets total amount calculation
      int count;
      cout<<"Enter no.of persons:";
      cin>> count;
      if(count>0)
      cout<<"Total amount due is :"<< count*25;
      else
      cout<<"no.of persons must be greater than zero";
      }
      else if(choice==3){ //family tickets total amount calculation
      int count;
      cout<<"Number of additional children in the group(more than 2):";
      cin>> count;
      if(count>0)
      cout<<"Total amount due is :"<< (count*15)+75;
      else
      cout<<"no.of persons must be greater than zero";
      }
      else{ //invalid option
      cout<<"Invalid Option";
      
      }
      }
      • 0
      • Reply
      • Share
        Share
        • Share on WhatsApp
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn

    Leave an answer
    Cancel reply

    You must login to add an answer.

    Forgot Password?

    Need An Account, Sign Up Here

    Sidebar

    Stats

    • Questions 1k
    • Answers 1k
    • Posts 138
    • Best Answers 65
    • Solution Revealed: NPTEL Programming in Java Week 1 Assignment 2023
    • NPTEL Joy of Computing Using Python Assignment Answers Week 1 2023
    • NPTEL Cloud Computing Assignment 1 Answers 2023
    • NPTEL An Introduction to Artificial Intelligence Week 1 Assignment Answers 2023
    • Ethical Hacking NPTEL Assignment 1 Answers 2023

    Popular Questions

    • I'M ADMIN

      Internshala ethical hacking final test answers: Question sequence differs but ...

      • 6 Answers
    • AK

      You have a green lottery ticket, with ints a, b, ...

      • 4 Answers
    • mj

      Solve by Gauss Elimination Method 5x+y+z+w=4 ,x+7y+z+w=12 , x+y+6z+w=-5, x+y+z+4w=-6

      • 3 Answers

    Explore

    • Recent Questions
    • Questions For You
    • Answers With Time
    • Most Visited
    • New Questions
    • Recent Questions With Time

    Footer

    Helpful Links

    • Disclaimer
    • Privacy Policy Notice
    • TERMS OF USE
    • FAQs
    • Refund/Cancellation Policy

    Follow

    © 2021-2022 Sikshapath. All Rights Reserved

    Insert/edit link

    Enter the destination URL

    Or link to existing content

      No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.