Project 3: Ticket Printer

Slides:



Advertisements
Similar presentations
1 Project 6: Tic Tac Toe. 2 Tic Tac Toe A Challange Project 10 Points extra credit on final grade OK to work in groups of 2 or 3.
Advertisements

1 9/1/06CS150 Introduction to Computer Science 1 What Data Do We Have? CS 150 Introduction to Computer Science I.
CS31: Introduction to Computer Science I Discussion 1A 4/2/2010 Sungwon Yang
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
Section 2 - More Basics. The char Data Type Data type of a single character Example char letter; letter = 'C';
1 Project 6: Cats in Tree. 2 Project 3: Cats in Tree In this project you will Create a class definition for a Cat class. Populate a BST with Cat information.
11 Introduction to Object Oriented Programming (Continued) Cats II.
1 Project 7: Huffman Code. 2 Extend the most recent version of the Huffman Code program to include decode information in the binary output file and use.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Towson University COSC 236
1 Project 5: Median. 2 The median of a collection of numbers is the member for which there are an equal number less than or equal and greater than or.
1 Project 7: My Photo Album Graded Project. 2 Assignment Write a web app to permit users to upload and view photos. User can keep up to five photos on.
1 Project 4: XML Product Browser (Not Graded). Objectives This project is an exercise of the following knowledge and skills: Accessing and displaying.
Modular Programming Chapter Value and Reference Parameters computeSumAve (x, y, sum, mean) ACTUALFORMAL xnum1(input) ynum2(input) sumsum(output)
Announcements 1st homework is due on July 16, next Wednesday, at 19:00 Submit to SUCourse About the homework: Add the following at the end of your code.
C++ Basics Structure of a Program. C++ Source Code Plain text file Typical file extension .CPP Must compile the C++ source code without errors before.
CS 114 – Class 02 Topics  Computer programs  Using the compiler Assignments  Read pages for Thursday.  We will go to the lab on Thursday.
1 Object Oriented Design COP 3331 Spring 2011 MWF 11:50 AM – 12:40 PM CHE 103 Instructor:Dr. Rollins Turner Dept. of Computer Science and Engineering ENB.
1 Project 4: Vehicle Inventory. 2 Write a program to read a text file containing information about vehicles and output the information First in the order.
1 Project 3: Chomp (Not graded). 2 Project 3 The game of Chomp was described in a Math Trek column in Science News:
1 Project 5: New Venue. 2 New Venue Based on the posted New Venue scenario 077_Ticket_Booth_Scenarios.pdf.
1 Project 7: Northwind Traders Order Entry. 2 Northwind Order Entry Extend the Select Customer program from Project 6 to permit the user to enter orders.
11 Introduction to Object Oriented Programming (Continued) Cats.
11 Project 2 Towers of Hanoi. 22 Towers of Hanoi is a well known puzzle that can be very difficult to solve manually but can be programmed very easily.
1 Project 5: Printing Address Labels. 2 Assignment Write a Windows forms program to display and print a set of address labels. Input from a csv file.
Ticket Booth Base Level 3 1. In the completed program, the ticket seller will: Select a venue from a menu of all venues. Select a show from a menu of.
1 Project 3 The Kumquat Society Conference. 2 Conference Registration In this project you will write a program to handle a conference registration. The.
Homework #2: Functions and Arrays By J. H. Wang Mar. 24, 2014.
1 COP 3331 Object Oriented Design Spring 2016 Section 001 F 8:00 AM – 10:45 AM CPR 115 Classroom Lecture 3 credit hours Instructor:Dr. Rollins Turner ENB.
1-Feb-16 Blackboard. Web sites All substantive information about this course is on the course website,
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
1 Project 3 String Methods. Project 3: String Methods Write a program to do the following string manipulations: Prompt the user to enter a phrase and.
1 Project 1: Tickets. 2 Class Ticket Write a definition for class Ticket. A Ticket object corresponds to a physical ticket for a stage show. Attributes.
Creating Forms on a Web Page. 2 Introduction  Forms allow Web developers to collect visitor feedback  Forms create an environment that invites people.
11 Introduction to Object Oriented Programming (Continued) Cats.
1 Project 2: Sorting Cats. Write a C++ console application to read a text file containing information about cats and output the information to the screen.
1 Project 4 Address Lookup. Project 4 Write an ASP.NET app that permits users to retrieve addresses from a potentially large list of addresses. There.
Homework 1 (due:April 8th) Deadline : April 8th 11:59pm Where to submit? eClass “ 과제방 ” ( How to submit? Create a folder. The name.
1 Project 3: Farey Sequences. 2 Farey Sequences Further details about Farey sequences, and more examples, can be found in the Wikipedia article:
1 Project 7: Looping. Project 7 For this project you will produce two Java programs. The requirements for each program will be described separately on.
1 Implementing Ticket Printer. Class Diagram 2 Dependencies A class that contains objects of another class, or has a reference to another class, depends.
11 Project 2 Temperature Conversion. 22 Project 2: Temperature Conversion Write an ASP.NET Web Forms app to convert temperatures from Fahrenheit to Celsius.
1 Project 5: Leap Years. 222 Leap Years Write a program that reads an integer value from the user representing a year and determines if the year is a.
1 Project 4: Computing Distance. 222 Computing Distance Write a program to compute the distance between two points. Recall that the distance between the.
1 Project 4: Palindrome Detector. 2 Assignment Write a C++ program that reads a line of text from the keyboard and reports to the user whether the text.
1 Project 4: Venue Sort. 2 This project is an exercise in Using C++ strings. Operator overloading. Text File Input.
Homework #4: Operator Overloading and Strings By J. H. Wang May 22, 2015.
1 Implementing Ticket Printer. Download project from last class Downloads/2016_02_12_In_Class/
1 Project 5 Eyeglass Rx User Control. Eyeglass Rx Earlier in the semester we looked at an eyeglass prescription as an example of an HTML table. 2.
IST 210: PHP Basics IST 210: Organization of Data IST2101.
1 Project 15: Animals Using Derived Classes and Inheritance.
1 Using an XML Parser. 2 Objective You will be able to use a publically available open source parser to convert an XML file into an internal data structure.
1 Project 6: New Venue. 2 New Venue Based on the posted New Venue scenario
1 Project 8: Tic Tac Toe. 2 Assignment Write an HTML and JavaScript page that pemits users to play Tic Tac Toe. Both players use a single browser. Alternating.
1 Project 7: Ticket_Booth_0 Using XML. 2 Ticket Booth 0 Base Level 0 of the real Ticket Booth program. Gets information for a single venue from an XML.
1 Project 12: Cars from File. This is an extension of Project 11, Car Class You may use the posted solution for Project 11 as a starting point for this.
1 Project 6: Northwind Orders. 2 The Northwind Traders Database The Northwind Traders database was created by Microsoft for training and demonstration.
Topic Pre-processor cout To output a message.
Objectives Identify the built-in data types in C++
Announcements 2nd homework is due this week Wednesday (October 18)
PRG 410 Competitive Success-- snaptutorial.com
PRG 410 Education for Service-- snaptutorial.com
PRG 410 Teaching Effectively-- snaptutorial.com
Announcements 3rd homework is due this week Wednesday (March 15)
Welcome to Intro to C/C++ CISC 192
Programming in JavaScript
Programming in JavaScript
Homework 2 (due:May 15th) Deadline : May 15th 11:59pm
Announcements HW1 is due TODAY.
Presentation transcript:

Project 3: Ticket Printer

Project 3: Ticket Printer Write a program to produce a set of tickets for a specific performance at a specific venue. You can modify the Ticket class from Project 1 for use in this project. OK to use posted solution. Use C++ strings for this project. No arrays of char (except for string literals)

Class Venue Write a definition for class Venue. A Venue object corresponds to a physical site for a performance. Attributes of a Venue are: Name Address (Described later) A collection of Seats Details on next slide Capacity (total number of seats) Capacity is computed from the seats collection.

Class Venue Let a Venue have a collection of Seat_Row objects. Maximum of 1000 rows. Each Seat_Row object has A name Number of seats. A collection of seats. Seats in each row are numbered consecutively starting with 1. Maximum of 1000 seats in a row.

Class Address Define a class to represent Addresses Attributes of an Address Street address City State – 2 characters Zip code – 5 digits Street address, City, and State should be C++ strings. Provide accessor functions to get (but not set) the values of all attributes.

Class Venue Design diagram for Venue Classroom discussion.

Class Performance Define a class to represent performances Attributes of a Performance Show Name (C++ string) Venue Date – Day, Month, Year (integers) Time – Hour, Minute (integers) Date and Time are the same as in Project 1

Class Performance Design diagram for Performance Classroom discussion.

Class Ticket Attributes of a Ticket: Performance Seat Sold (boolean) Includes Venue and date/time Seat Sold (boolean)

Class Ticket_Book A Ticket_Book object holds tickets for all seats of a specific Performance. Display method outputs a complete set of tickets. For this project, output to the screen.

Class Ticket_Book Design diagram for Ticket_Book Classroom discussion.

Program Ticket_Printer Your main() function should produce a Ticket_Book for a performance of “Billy Elliot” at The Little Theater on April 2, 2011 at 8:00 PM. The Little Theater is located at 19 Foster Street, Littleton, MA, 01460. The Little Theater has 3 rows, with names A through C. Each row has 4 seats.

Program Ticket_Printer Use the main() function on the following slide. Create a Venue object. Create a Performance object. Create a Ticket_Book object. Use the Ticket_Book object to display the tickets on the screen. There is no user input. All information must be built in. A more realistic program would get the needed information from a file.

main() int main() { cout << "This is program Ticket_Printer\n\n\n"; Venue* venue = Create_Venue(); Performance* performance = Create_Performance(venue); Ticket_Book* ticket_book = new Ticket_Book(performance); ticket_book->Display(); cin.get(); return 0; }

Program Output

Program Output

Development Environment You may develop your program on any system you like. But you should test the finished program on Circe. The same source files should compile and run on either Windows or Linux.

Ground Rules You may work with one other person. OK to work alone if you prefer. If you do work as a pair Both members are expected to contribute. Submit a single program. Both members should understand the program in detail. Do not share your code with other students. Before or after submitting the project. OK to discuss the project. Do not copy any other student’s work. Don’t look at anyone else’s program. Don’t let anyone look at your program.

Ground Rules Do not copy code from the Internet Write your own code. Except for code posted on the class web site Do not copy code from the Internet or any other source. Write your own code.

Submission Project is due by 11:59 PM, Thursday, Feb. 17. Deliverables: Source code only. Zip the files for submission this time. Please put your source files into a folder Use the Windows “Send to Compressed Folder” command Do not submit any other form of zipped folder (e.g. WinRAR, tar) If you have trouble zipping the files, submit the separate files. If you work with another student, include both names in the Blackboard submission comments. Other student should submit just a Blackboard comment including both names. End of Presentation