Đã Trao

Lập trình C++ Job by pathfinderjesse

The purpose of this assignment is to assess that you have learned the fundamental concepts of Computer Programming using ANSI C.

1. Summary

Write a program using the C Programming language (ANSI C), which allows the user to store and retrieve records representing stadium seat bookings for customers from different countries, with some basic statistic counts of the number of customers from each country.

2. Functional Requirements

The London 2012 Olympics Organisers are anticipating a huge number of visitors from all over the world for the opening ceremony and have asked you to write a very simple Seat Booking system to track the availability of seats for the event and also show some statistics regarding the number of visitors from each country. The details of the booked seats need to be stored in a file and the user must be able to show existent seat bookings, book a seat, and display country statistics (i.e. the number of seats booked for each distinct country).

The details to be maintained in file about each seat booking are:

a) Name of customer (maximum 25 characters).

b) Surname of customer (maximum 25 characters).

c) Country Code (maximum 3 characters).

d) Passport Number (maximum 10 characters).

The seats in the Olympic Stadium are organized in Sections from A to Y (i.e. 25 sections in total). Each Section has 10 rows, from Row A to J. Each Row of each section has 9 seats numbered 1 to 9. A seat is thus identified by Section, Row and Seat Number (or Column), for example Section A, Row F, Column 3. This means that a section has a total of 90 seats.

You are expected to visualize each section (individually) in a simple text-based grid for the user, so that booked seats are easily identifiable with an X, while available seats are also identifiable with a _. This way the user can immediately find vacant seats which are still available to book. Figure 1 illustrates an example of how this could look like. The program must offer the user 4 options:

1. Show bookings.

2. Book a seat.

3. Display country statistics.

4. Quit.

1.1 Show Bookings Function

The ‘Show Bookings’ option should prompt the user to select a section (from A to Y) and, if a valid section letter is provided by the user, the section’s seat map grid should be displayed, with the Row letters on the left vertical axis and the seat numbers at the top horizontal axis.

With the seats for the selected Section displayed, the user should be then prompted to enter the Row letter and Seat Number within that section. If the seat has been booked the Name, Surname, Country and Passport Number of the customer booked at that seat should be displayed. If the seat is still vacant a message indicating that the seat is still empty should be displayed.

Validations must be in place to check that the user specifies a valid Section Letter, Row Letter and Seat Column number. Section and Row letters should be case insensitive, i.e. a user can specify Section A by either typing ‘A’ or ‘a’, and the program must be capable of understanding both.

1.2 Book a seat

The ‘Book a Seat’ option should prompt the user to select a section (from A to Y) and, if a valid section letter is provided by the user, the section’s seat map grid should be displayed, with the Row letters on the left vertical axis and the seat numbers at the top horizontal axis.

With the seats for the selected Section displayed, the user should be then prompted to enter the Row letter and Seat Number within that section. Validations must be in place to check that the user specifies a valid Section Letter, Row Letter and Seat Column number. Section and Row letters should be case insensitive, i.e. a user can specify Section A by either typing ‘A’ or ‘a’, and the program must be capable of understanding both.

At that point the program should check if the seat is still vacant or if it was already booked.

If the seat has already been booked an error message stating that the seat is not available because it was already...

Kỹ năng: Lập trình C++

Xem thêm: world programming system, understanding computer programming, top statistics, top programming language, stored program computer, simple computer programming, quit letter, purpose means, project details example, programming language concepts, olympic programming, may 2, write quit letter, write programming language, functional programming language, functional programming concepts, event based programming, programming language book, programming find function, computer programming requirements, computer programming london, computer programming concepts, computer programming code, computer programming book, computer programming basic concepts

Về Bên Thuê:
( 1 nhận xét ) PUNE, India

Mã Dự Án: #1609823