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.

Slides:



Advertisements
Similar presentations
Making Choices in C if/else statement logical operators break and continue statements switch statement the conditional operator.
Advertisements

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.
CHAPTER 30 THE HTML 5 FORMS PROCESSING. LEARNING OBJECTIVES What the three form elements are How to use the HTML 5 tag to specify a list of words’ form.
Overview creating your own functions calling your own functions.
C++ data types. Structs vs. Classes C++ Classes.
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.
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.
JavaScript Events and Event Handlers 1 An event is an action that occurs within a Web browser or Web document. An event handler is a statement that tells.
11 Values and References Chapter Objectives You will be able to: Describe and compare value types and reference types. Write programs that use variables.
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.
Modular Programming Chapter Value and Reference Parameters t Function declaration: void computesumave(float num1, float num2, float& sum, float&
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.
INTERNET APPLICATION DEVELOPMENT For More visit:
1 Project 4: XML Product Browser (Not Graded). Objectives This project is an exercise of the following knowledge and skills: Accessing and displaying.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
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 Software Systems Development CEN Spring 2011 TR 12:30 PM – 1:45 PM ENB 116 Instructor:Dr. Rollins Turner Dept. of Computer Science and Engineering.
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.
NMD202 Web Scripting Week3. What we will cover today Includes Exercises PHP Forms Exercises Server side validation Exercises.
1 Project 3: Chomp (Not graded). 2 Project 3 The game of Chomp was described in a Math Trek column in Science News:
Keeping it Neat: Functions and JavaScript Source Files Chapter 7.
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.
CS Class 05 Topics  Selection: switch statement Announcements  Read pages 74-83, ,
Liang, Introduction to C++ Programming, (c) 2007 Pearson Education, Inc. All rights reserved X1 Chapter 3 Control Statements.
11 Project 2 Temperature Conversion (Not graded).
1 JavaScript
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 Flight Times. 2 Problem Specification 3 Additional Specifications You may assume that the input is a valid 24 hour time. Output the time entered by.
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.
Project 3: Ticket Printer
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.
Scis.regis.edu ● CS-361: Control Structures Week 2 Dr. Jesús Borrego Lead Faculty, COS Regis University 1.
Fall 2015CISC/CMPE320 - Prof. McLeod1 CISC/CMPE320 Managers and “mentors” identified on projects page. All member accounts created and projects populated.
1 Data Structures COP 4530 Spring 2010 MW 4:35 PM – 5:50 PM CHE 101 Instructor:Dr. Rollins Turner Dept. of Computer Science and Engineering ENB
CMSC 2021 CMSC 202 Computer Science II for Majors Spring 2003 Mr. Frey (0101 – 0104) Mr. Raouf (0201 – 0204)
1 CAP 4063 Web Application Design Spring 2016 Section 001 TR 11:00 AN – 12:15 PM ENG 4 (classroom lecture) 3 credit hours Instructor:Dr. Rollins Turner.
Slide 1 Chapter 6 Structures and Classes. Slide 2 Learning Objectives  Structures  Structure types  Structures as function arguments  Initializing.
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.
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.
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.
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.
An Introduction to Programming with C++ Sixth Edition Chapter 5 The Selection Structure.
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.
1 Project 15: Animals Using Derived Classes and Inheritance.
Day 22, Slide 1 CSE 103 Day 22 Non-students: Please logout by 10:12. Students:
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.
The Selection Structure
Specifications What? Not how!.
PRG 410 Competitive Success-- snaptutorial.com
PRG 410 Education for Service-- snaptutorial.com
PRG 410 Teaching Effectively-- snaptutorial.com
In Class Programming BIS1523 – Lecture 11.
Chapter 9 Introduction To Classes
C++ data types.
Presentation transcript:

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 of a Ticket are: Name of Show Name of Venue Date (3 integers, Month, Day, Year) Time (2 integers, hour (0..23), minute (0..59) Seat Row Name Seat Number (A positive integer)

3 Class Ticket Define structs to represent date/time and seat. Put the struct definitions in Ticket.h prior to the class definition. Let the constructor take four parameters: Show_Name Venue_Name When (Date and Time) Seat (Row Name and Seat Number)

4 A Changeable Attribute Let each ticket have a Boolean attribute called "sold" Initially false. Member function Sell() sets sold to true. Note: bool is a type in C++.

5 Display() Public member function Display() outputs all attribute values to the console. See sample run for format. Make your output match the sample run.

6 Accessor Methods Provide an accessor method for each attribute: Venue_Name Show_Name When Seat Sold

7 Main Program Write a program to test the class definition. The main program: Gets attributes for a ticket from the user. Dynamically creates a Ticket object with the specified attributes. Calls the ticket's Display() method. Gets the attributes of the Ticket object with the accessor methods and shows them in the same format as the Display method. Sells the ticket. Calls the ticket's Display() method again. Deletes the ticket.

8 Main Program Exit after creating and displaying one Ticket. Input validity checking is not required. Assume user inputs valid values for all parameters. OK to fail on invalid input.

9 Sample Run -- Windows

10 Sample Run -- Linux Continued on next slide

Sample Run -- Linux (continued) 11

Implementation Tips Read about I/O manipulators. Textbook page 1091 Header file iomanip Specific manipulators: setfill( ) setw( ) 12

13 Development Environment You may develop your program on any system you like. But you should test the finished program on Circe. The same source file 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 Work together! Both members are expected to contribute. Submit a single program. Both members should understand work in detail. Do not share your code with other students. Before or after submitting the project. It is OK to discuss the project. Do not copy any other student’s work. Don’t look at anyone else’s code Don’t let anyone look at your code. 14

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

16 Submission Project is due by 11:59 PM, Thursday, Jan 28. Deliverables: Source code only. Three files: Test_Ticket.cpp (Main Program), Ticket.h, Ticket.cpp Zip the files and submit the.zip file Submit the files using the Canvas Assignment for this class. If you work with another student, include both names in the assignment comments. One student submits the files Other student should submit just a Canvas submission comment including both names. End of Presentation