I have no idea how to make a code out of this scenario for C++?

How the program should work :

When the cinema sales staff start the program they will be asked to enter their staff name,

the date and which of two films the customer wants to see. The films are Deadpool and Goosebumps

Cinema ticket prices are charged as follows :

Ticket Prices

Adult £10.30

Senior citizen 20% reduction

Children half the Adult price

A customer’s booking for a particular show can be for a number of tickets, at different prices

(e.g. one adult and two children, or one adult and one senior citizen etc.). The maximum

number of customers in the cinema is 60 so the tickets purchased must be validated .

Calculate the cost of the number of tickets purchased by the customer

The screen should be cleared and the a customer receipt must be displayed, showing the

Cinema name, Film seen , staff name, number of tickets purchased in each category, the

total cost in each category and the total to be paid.

At the end of the day, after the sale of tickets to the last customer, the program should

calculate and display the cinemas’ total sales income for both shows
I have no idea how to make a code out of this scenario for C++?

… and so you've just copied and pasted your homework????
need to show some effort first, if not in code at least psuedo-code


i started of with this but i dont know if it is correct this is advanced level code and i want to try it out but i am very stuck. i dont know if it is right a little help please

#include <iostream>
#include <string>

using namespace std:

int main(){

int SName( int james, int mary, int dan)

cout<< "Please enter you staff name : " ;

cin>> james;

cout<< "Please enter you staff name : " ;

cin>> mary;

cout<< "Please enter you staff name : " ;

cin>> dan;


}

this is advanced level code

It is nowhere near advanced, it is as basic as it gets.

You created a main function, and you have some cout statements, so that is a start. But I suggest you actually study a bit of basic programming first before diving in head first.

Here is a good tutorial on basic input and output, which is the majority of this task - http://www.cplusplus.com/doc/tutorial/basic_io/

You can google c++ basics. You can even type it on youtube and learn the basics there too.

Once you've done all of this. Try and make the program, if you run into problems feel free to post it and ask specific questions. And please, put your code between code tags so it is readable - http://www.cplusplus.com/articles/jEywvCM9/

Goodluck!
Last edited on
The little code snippet you've posted has too many errors to go through one by one and demonstrates a poor grasp of C++ basics. I suggest you get yourself a good text-book first and go through the fundamentals. My personal recommendation for introductory C++ is “C++ Primer Plus (5th ed)” by Stephen Prata but I'm sure there are many others. Pick one that suits your style and do the exercises following each chapter
Topic archived. No new replies allowed.