Free Essay

Reserved

In:

Submitted By donaire3alyh
Words 539
Pages 3
1. using System; 2. 3. class AirlineResevationSystem 4. { 5. static void Main() 6. { 7. int seatsFirst, seatsEconomy, reserve, i = 0, j = 6; 8. bool[] seats = { false, false, false, false, false, 9. false, false, false, false, false }; // seating chart 10. Console.WriteLine("Welcome to Airline Reservation System."); // greet the user 11. 12. while (true) 13. { 14. Console.WriteLine("There are " + checkFirstClass(out seatsFirst, seats) + " first class seats and " + checkEconomy(out seatsEconomy, seats) + " economy seats."); // check available seats 15. Console.WriteLine("Please enter 1 to reserve a first class seat or enter 2 to reserve an economy class seat or 0 to exit"); // promt user for input 16. reserve = Convert.ToInt32(Console.ReadLine()); // input from user 17. if (reserve == 1) 18. { 19. if (i > 5 || i == 5) 20. { 21. Console.WriteLine("There are no first class seats available. Would you like an economy class seat? Type 2 for yes and 0 to exit."); 22. reserve = Convert.ToInt32(Console.ReadLine()); // RIGHT HERE I WOULD LIKE THE PROGRAM TO GO BACK TO THE INITIAL IF STATEMENT AND CHECK THE CONDITIONS. ANY ADVICE? 23. } 24. else reserveFirstSeat(ref seats, ref i); // reserve first class seat 25. } 26. else if (reserve == 2) 27. { 28. if (j < 5 || j > 10) 29. { 30. Console.WriteLine("There are no economy seats available. Would you like a first class seat? Type 1 for yes and 0 to exit."); 31. reserve = Convert.ToInt32(Console.ReadLine()); // RIGHT HERE I WOULD LIKE THE PROGRAM TO GO BACK TO THE INITIAL IF STATEMENT AND CHECK THE CONDITIONS. ANY ADVICE? 32. } 33. else reserveEconomySeat(ref seats, ref j); // reserve economy class seat 34. } 35. else if (reserve == 0) 36. { 37. Console.WriteLine("Next flight leaves in three hours."); // ALSO, I WANT TO ADD HOW MANY FIRST CLASS TICKETS WERE RESERVED IF ANY AND SAME THING FOR ECONO CLASS BUT I'M NOT SURE HOW TO KEEP TRACK OF IT. ANY ADVICE? 38. break; 39. } 40. else 41. { 42. Console.WriteLine("Invalid entry. Please try again"); 43. } 44. 45. 46. } 47. } 48. 49. 50. 51. public static int checkFirstClass (out int seatsFirst, bool [] seats) // method to check available First Class seats 52. { 53. seatsFirst = 0; 54. for (int i = 0; i<5; i++) 55. { 56. if (seats[i] == false) 57. seatsFirst++; 58. } 59. 60. return seatsFirst; 61. } 62. 63. public static int checkEconomy (out int seatsEconomy, bool [] seats) // method to check available Economy seats 64. { 65. seatsEconomy = 0; 66. for (int i = 5; i<10; i++) 67. { 68. if (seats[i] == false) 69. seatsEconomy++; 70. } 71. 72. return seatsEconomy; 73. } 74. 75. public static void reserveFirstSeat (ref bool [] seats, ref int i) // reserve selected first class seat 76. { 77. 78. 79. if (i<5) 80. { 81. if (seats[i] == false) 82. { 83. seats[i] = true; 84. Console.WriteLine("You have successfully reserved a first class seat"); 85. } 86. } 87. ++i; 88. 89. } 90. 91. public static void reserveEconomySeat (ref bool [] seats, ref int j) // reserve selected economy class seat 92. { 93. if (j > 5 || j == 5 || j<10) 94. { 95. if (seats[j] == false) 96. { 97. seats[j] = true; 98. Console.WriteLine("You have successfully reserved an economy class seat"); 99. 100. } 101. } 102. ++j; 103. 104. } 105. }

Similar Documents

Premium Essay

Reserved Words

...9.3 Reserved Words Certain words such as SELECT, DELETE, or BIGINT are reserved and require special treatment for use as identifiers such as table and column names. This may also be true for the names of built-in functions. Reserved words are permitted as identifiers if you quote them as described in Section 9.2, “Schema Object Names”: mysql> CREATE TABLE interval (begin INT, end INT); ERROR 1064 (42000): You have an error in your SQL syntax ... near 'interval (begin INT, end INT)' mysql> CREATE TABLE `interval` (begin INT, end INT); Query OK, 0 rows affected (0.01 sec) Exception: A word that follows a period in a qualified name must be an identifier, so it need not be quoted even if it is reserved: mysql> CREATE TABLE mydb.interval (begin INT, end INT); Query OK, 0 rows affected (0.01 sec) Names of built-in functions are permitted as identifiers but may require care to be used as such. For example,COUNT is acceptable as a column name. However, by default, no whitespace is permitted in function invocations between the function name and the following “(” character. This requirement enables the parser to distinguish whether the name is used in a function call or in nonfunction context. For further detail on recognition of function names, see Section 9.2.4, “Function Name Parsing and Resolution”. The words in the following table are explicitly reserved in MySQL 5.6. In addition, _FILENAME is reserved. At some point, you might upgrade to a higher version, so it is a...

Words: 605 - Pages: 3

Free Essay

Pt1420 Unit 2

...Short Answers 1. What does a professional programmer usually do first to gain an understanding of a problem? The first thing a professional programmer will usually do to gain the understanding of a problem is to work directly with, and interview the customer. 2. What is pseudocode? Pseudocode is an informal language that has no syntax rules, and is not meant to be compiled or executed. 3. Computer programs typically perform what three steps? 1) Input is received. 2) Some process is performed on the input. 3) Output is produced. 4. What does the term “user-friendly” mean? "User friendly" means that the software or device is easy to use, and that the person using it won't have a hard time learning how to use it or have problems while using it. Algorithm Workbench 1. Design an algorithm that prompts the user to enter his or her height and stores the user’s input in a variable named height. 1. Get the user to input their height. 2. Store user height as a variable named height 2. Design an algorithm that prompts the user to enter his or her favorite color and stores the user’s input in a variable named color. 1. Get the user to input their favorite color. 2. Store user color as a variable named color Programing Exercises 1. Personal Information Display “Enter your name” Input name Display “Enter your address, with city, state, and zip” Input address, with city, state, and zip Display “Enter your telephone number” Input telephone number Display “Enter your college...

Words: 676 - Pages: 3

Free Essay

Equities Trading in a Company

...Charles River Investment Management System U.S. Equity User’s Guide Charles River Development Version 7.2 Series Document Version 1.2 April 25, 2004 Document Version 1.2 Charles River Development 7 New England Executive Park Burlington, MA 01803 +1 781 238 0099 telephone +1 781 238 0088 fax www.crd.com U.S. Equity User’s Guide, Version 7.2 Charles River Development, All Rights Reserved. Document Version 1.2 Copyright © 1993-2003 Charles River Systems, Inc. (d/b/a Charles River Development) All Rights Reserved This document is the copyrighted product of Charles River Systems, Inc. and constitutes confidential and proprietary information of Charles River Systems, Inc. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, recording, or any information storage and retrieval system, without permission in writing from Charles River Systems, Inc. The information in this document is subject to change without notice. The software referred to in this document is furnished under a license and may be used only in accordance with the terms of such a license. The products and companies mentioned herein are for the purpose of identification or example. They may be trademarks and/or registered trademarks of their respective manufacturers. Adobe® Acrobat® Distiller® and Adobe® Acrobat® Reader® are registered trademarks of Adobe Systems Incorporated in the United States and/or...

Words: 29057 - Pages: 117

Free Essay

Sfac 5

...communications solutions are not for everyone, and many organizations are shifting to a secure hosted collaboration solution in order to: • Increase agility to quickly scale up or down • Extend collaboration applications to anyone, anywhere • Free up IT resources to focus on core business • Reduce total cost of ownership (TCO) • Replace an aging voice or video communications system The cloud can reduce complexity for users who just want to get their jobs done and enable new levels of collaboration. This brochure shares the experiences of actual customers who replaced their on-premises communications system with a secure Cisco Powered cloud service based on Cisco Hosted Collaboration Solution (HCS). © 2013 Cisco Systems, Inc. All rights reserved. 1 Table of Contents Increased Agility to Scale Up and Down.........................................................................................3 Global Document Management Company Sets Up Contact Center in Two Weeks...............................3 Life Insurance Company Adds New Locations Without Increasing IT Staff............................................4 Testimonial: Scotts LawnService Scales Contact Center Agents for the Season.................................5 Extend Collaboration Applications to Anyone, Anywhere, Using Any Device ................................ 6 Manufacturer Equalizes Communications Capabilities for All Dealers.....................................................6 Food-Products Company Provides Consistent...

Words: 3680 - Pages: 15

Free Essay

Teradata Introduction

...Coffing Data Warehousing Education Outline 02/17/05 TERADATA EDUCATION OUTLINE Coffing Data Warehousing has provided quality Teradata education, products and services for over a decade. We offer customized solutions to maximize your warehouse. Toll Free: 1-877-TERADAT Business Phone: 1-937-855-4838 Email: mailto:CDWSales@CoffingDW.com Website: http://www.CoffingDW.com In addition to the course material listed in this outline, we also offer Teradata classes in Teradata Basics, Implementation, SQL, Database Administration, Design and Utilities. Please contact us so we can customize a course to fit your specific needs. © 2006 Coffing Data Warehousing – All rights reserved. Confidential. 1 Coffing Data Warehousing Education Outline 02/17/05 PURPOSE Coffing Data Warehousing has been providing quality Teradata education for over a decade. We offer customized courses to maximize the effectiveness of each class. The purpose of this proposal is to build a lasting relationship with your company. To this end, we have combined our comprehensive Teradata education services in a unique package that we feel best suits the diverse needs of your company while offering our high quality product at competitive pricing. Coffing Data Warehousing is excited to offer you, our preferred partner, an innovative new way to look at training at the CoffingDW Teradata University (CDW-TU). This approach provides the ability to maximize learning potential. Our goal is to make your employees...

Words: 1512 - Pages: 7

Free Essay

Counseling Form

...N C DBA ©2010 Army Counseling Online.com. All Rights Reserved. Content for indiv idual use o nly . Distrib ution is proh ibited PVT/E-1 NC individual use on ly . Distribu tion is proh ibited prohibited EIN C DBA ©2010 Army Counseling Online.com. All Rights Reserved. Content for indiv idual u se only . Distrib utio n is pro hibited MEIN C DBA ©2010 Army Counseling Online.com. All Rig hts Reserved. Con tent for ind ivid ual use only . Dis tribution is prohibited C DBA ©201 0 Army Counseling On line.com. All Righ ts Reserved. Conten t for individual u se only . Distribution is prohib ited - Took two military correspondence MEINC D BA ©2 010 Army Counseling Online.com. All Rights Reserved. Con tent fo r individ ual use on ly . Distribu tion is proh ibited MEINC D BA ©201 0 Army Counseling On line.com. All Righ ts Reserved. Conten t for individual use only . Distr ibution is prohib ited “SEE CONTINUATION OF COUNSELING” MEINC DBA ©2010 ArmyCounseling Online.com. All Rights Reserved. Content of this Counseling Statement For individual use Continuation of Counseling Form 10 Army Counseling On line.com. All Righ ts Reserved. Content for indiv idual u se only . Distributio n is prohibited MEINC D BA ©201 0 Army Counseling On line.com. All Righ ts Reserved. Conten t for individual use only . Distr ibution is prohib ited MEINC D BA ©201 0 Arm y Counseling On line.com. All Righ ts Reserved. Conten t for individual use only . Distr ibution is prohib ited...

Words: 510 - Pages: 3

Premium Essay

C13 Change&Innovation

...ninth edition STEPHEN P. ROBBINS MARY COULTER Chapter 13 © 2007 Prentice Hall, Inc. All rights reserved. Managing Change and Innovation PowerPoint Presentation by Charlie Cook The University of West Alabama LEARNING OUTLINE Follow this Learning Outline as you read and study this chapter. Forces for Change: Two Views of the Change Process • Discuss the external and internal forces for change. • Contrast the calm waters and white-water rapids metaphors of change. • Explain Lewin’s three-step model of the change process. Managing Organizational Change • Define organizational change. • Contrast internal and external change agents. • Explain how managers might change structure, technology, and people. © 2007 Prentice Hall, Inc. All rights reserved. 13–2 L E A R N I N G O U T L I N E (cont’d) Follow this Learning Outline as you read and study this chapter. Managing Change • Explain why people resist change and how resistance might be managed. Contemporary Issues in Managing Change • Explain why changing organizational culture is so difficult and how managers can do it. • Describe employee stress and how managers can help employees deal with stress. • Discuss what it takes to make change happen successfully. © 2007 Prentice Hall, Inc. All rights reserved. 13–3 L E A R N I N G O U T L I N E (cont’d) Follow this Learning Outline as you read and study this chapter. Stimulating Innovation • Explain why innovation isn’t just...

Words: 1504 - Pages: 7

Premium Essay

Solid Mechanic

...Solutions 46060 5/6/10 1:45 PM Page 1 © 2010 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced, in any form or by any means, without permission in writing from the publisher. 2–1. An air-filled rubber ball has a diameter of 6 in. If the air pressure within it is increased until the ball’s diameter becomes 7 in., determine the average normal strain in the rubber. d0 = 6 in. d = 7 in. e = pd - pd0 7 - 6 = = 0.167 in./in. pd0 6 Ans. 2–2. A thin strip of rubber has an unstretched length of 15 in. If it is stretched around a pipe having an outer diameter of 5 in., determine the average normal strain in the strip. L0 = 15 in. L = p(5 in.) e = L - L0 5p - 15 = = 0.0472 in.>in. L0 15 Ans. 2–3. The rigid beam is supported by a pin at A and wires BD and CE. If the load P on the beam causes the end C to be displaced 10 mm downward, determine the normal strain developed in wires CE and BD. D E 4m P ¢LBD ¢LCE = 3 7 ¢LBD = eCE 3 (10) = 4.286 mm 7 ¢LCE 10 = = = 0.00250 mm>mm L 4000 ¢LBD 4.286 = = 0.00107 mm>mm L 4000 A B C 3m 2m 2m Ans. Ans. eBD = 1 02 Solutions 46060 5/6/10 1:45 PM Page 2 © 2010 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected under all copyright laws as they currently exist. No portion of this material may be reproduced...

Words: 4800 - Pages: 20

Premium Essay

Sample Interview Guide

...note of how the individual discusses behaviors in relation to the specific traits listed. You may find that Reid T. Clifford has developed strategies to compensate for possible limitations. Since you may need to discuss other topics, such as experience, job knowledge, and technical skills, we suggest reading through the guide beforehand and choosing the questions most relevant to your hiring needs. If you would like additional information regarding Reid T. Clifford's potential or personality assessment results, would like to discuss how to best proceed, have more questions, or need help integrating these results into your hiring process, you are invited to contact your Caliper consultant. Copyright © 2008 Caliper Management. All rights reserved. 1 Reid T. Clifford ABC Company, Ltd. Leadership Area to investigate: Provides direction, sets standards, and defines expectations Specific traits to investigate:...

Words: 910 - Pages: 4

Free Essay

Cpa Requirements

...PARCA CPAS2014 Requirements JJ PARCA Certified PACS Associate (CPAS2014) Requirements Copyright notice: Copyright © 2014 PACS Administrators in Radiology Certification Association (PARCA). All rights reserved. All rights reserved. This publication is protected by copyright. No part may be reproduced in any form or by any means, including photocopying, or utilized by any information storage and retrieval system without permission of the copyright owner. All rights reserved PARCA V 3.5 Page 1 PARCA CPAS2014 Requirements Certified PACS Associate (CPAS) requirements This document contains the detailed requirements for the certification of a CPAS2014 or Certified PACS Associate. The focus is on general technical and clinical understanding. CPAS2014 is an update to the original CPAS requirements published in 2005 to include new technologies and developments. The requirements are split up in two sections: A) Technical (IT) and B) Clinical. A. Technical (IT) requirements 1. Computer basics (20%) 1.1 Hardware: A computer has hardware components, i.e. CPU, memory, Disk, removable media, display card and display and data entry devices (aka peripherals) such as keyboard and mouse and others. There are several standard interfaces, such as serial and parallel ports, FireWire and several choices of disk and network interfaces. – Know how to distinguish between these components and interfaces and the function and characteristics of each of them...

Words: 2505 - Pages: 11

Free Essay

Draft

........................ Bathrooms: □ □ □ □ □ □ □ □ □ □ □ □ □ □ Change and launder bath mats, towels, and washcloths. Clean toilets, bathtubs, showers, and sinks. Dust light fixtures. Empty trash bins and wipe the insides and outsides. Vacuum and mop floors. Wipe mirrors. Bedrooms: Change and launder sheets and pillowcases. Discard magazines and catalogs on side tables; store those you want to keep. Dust surfaces, including furniture, objects, and light fixtures. Empty trash bins. Fluff pillows and comforters. Vacuum floors. Dining Room: Dust surfaces and objects, including furniture and light fixtures. Vacuum upholstery and floor. www.marthastewart.com/checklists © 2009 Martha Stewart Living Omnimedia, Inc. All rights reserved. Entryways, Stairs, and Hallways: □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ □ Dust staircase banisters, furniture, objects, and light fixtures. Launder machine-washable throw rugs and runners. Vacuum stairs and landings. Vacuum and mop floors. Wipe mirrors. Home Office: Dust surfaces and objects, including furniture, light fixtures, and electronics. Empty trash bin. Sort through in-boxes: pay bills, file paid bills and paperwork. Vacuum floor. Kitchen: Discard foods and beverages past their prime. Dust light fixtures. Flush drain with boiling water. Wipe surfaces, including sink, countertops, the outside of the ventilation hood, refrigerator and cupboard doors. Wipe the inside of the oven, microwave, and toaster oven. Wipe the inside...

Words: 304 - Pages: 2

Free Essay

Integrative Network Design Project

...Integrative Network Design Project II Communications protocols are where the rubber meets the road when discussing communications between computers. These protocols set the parameters for computer communication and allow them to communicate in an organized manner. Without protocols a network would be worthless and very ineffective. The protocols help not only in preventing errors but they also provide a way of tracking down errors by giving the user a systematic process to check for possible repairs. Some of the main things protocols do are: 1. Provide private communication capabilities. 2. Give users the ability to authenticate traffic. 3. Organizes packets (Packets are data organized in a specific format containing user information/ handling instructions). 4. Provide a way to pinpoint errors in communication. The proposed changes to the system are based on the technical vulnerabilities caused by using hardware/software and wiring that is old or not optimal. The current protocols used are acceptable but need to be overhauled in order to provide Kudler with faster communication over long distance. Uniformity of the network is obvious in the current Ethernet network set up built over T3 100 base connections and the versatility of the Novell 4.11 server is a plus; but the Novell uses an Internet Package Exchange/Sequence Package protocol (IPX/SPX). This protocol is generally supported but not globally supported like TCP/IP. The IPX/SPX protocol works great with Intranet/Intraware...

Words: 745 - Pages: 3

Premium Essay

Grey Matter

...YOUR OWN GROUP DISCUSSION HANDBOOK A RAPID READER FREE GUIDE BY KAUSHIK DAS HR CREST Release © 2012, 1st Edition. All Rights Reserved. www.hrcrest.com HRCREST YOUR OWN GROUP DISCUSSION HANDBOOK For More Tips & Tutorials, Products Visit www.hrcrest.com YOUR OWN GROUP DISCUSSION HANDBOOK BY KAUSHIK DAS © 2012 HR CREST. All rights reserved worldwide. PERMISSION The author grants full permission to distribute this HR Guide freely, in your ezine, website, blog, forum, RSS feed or print publication and/or distribute it as a free bonus with other products, provided it is left completely intact, unaltered and delivered via this PDF file for FREE and not be sold. You are also permitted to forward this ebook to friends, families and networks. If you would like to re-print or re-purpose any of this content, please use proper attribution (Courtesy of HR CREST Release & The Author, Sudakshina Bhattacharya) and provide a link back to ( www.hrcrest.com ). You must agree to include the FULL Resource box or SIG line provided below in your distribution and to make the link active/linkable with no syntax changes. Resource Box/SIG Line: Kaushik Das, currently associated with an MBA Institute of International Repute as the Associate Vice President - Corporate Relations. He is also one of the distinguished faculty at the Institute. In addition to that, Kaushik is a contributory author for HR Crest and his posts and HRcrest youtube channel videos are highly popular amongst "In...

Words: 8280 - Pages: 34

Premium Essay

Is 3120, Rfp

...Submitted on August 30th, 2013 Submitted on August 30th, 2013 Prepared for MHMRA, Purchasing Department Prepared by Network Solutions u All rights reserved. ALL OFFENDERS WILL AUTOMATICALLY BE SUED IN A COURT OF LAW. All rights reserved. ALL OFFENDERS WILL AUTOMATICALLY BE SUED IN A COURT OF LAW. All rights reserved. IT IS ILLEGAL AND STRICTLY PROHIBITED TO DISTRIBUTE, PUBLISH, OFFER FOR SALE, LICENSE OR SUBLICENSE, GIVE OR DISCLOSES TO ANY OTHER PARTY, THIS PRODUCT IN HARD COPY OR DIGITAL FORM. ALL OFFENDERS WILL BE SUED IN A COURT OF LAW. All rights reserved. IT IS ILLEGAL AND STRICTLY PROHIBITED TO DISTRIBUTE, PUBLISH, OFFER FOR SALE, LICENSE OR SUBLICENSE, GIVE OR DISCLOSES TO ANY OTHER PARTY, THIS PRODUCT IN HARD COPY OR DIGITAL FORM. ALL OFFENDERS WILL BE SUED IN A COURT OF LAW. Network Infrastructure Upgrade Network Infrastructure Upgrade Table of Contents Statement of Confidentiality & Non-Disclosure 2 Executive Summary 3 1. Company Background 4 2. Client Background………………………………………………………………………………………………5 3. Information of Needs……………………………………………………………………………………………6 3.1 MHMRA Requirements………………………………………………………………………………………….6 4. Project Scope…………………………………………………………………………………………………….7 4.1 Scope of Work……………………………………………………………………………………………………7 4.2 Network Scope…………………………………………………………………………………………………..7 5. Proposed Services………………………………………………………………………………………………8 5.1 Objectives………………………………………………………………………………………………………...

Words: 3578 - Pages: 15

Free Essay

Cloud Integrations

...§ Actual implementa0on 0meline. § Key non-technical problems in integra0on. § The strategic role of Dell Boomi Jump Start § Learning. § Future road map for Dell Boomi at Tegile ©Copyright 2016 Tegile Systems Inc. All Rights Reserved. Company Confiden0al 2 #compromisenothing Intelligent Flash Storage for All Your Applica8ons TEST/DEV MESSAGING COLLABORATION WAREHOUSING Consolidated, Virtualized Workloads Balanced Performance ANALYTICS OLTP Low Latency Apps Very High Performance Capacity Media (HDD, TLC, MLC) Performance Media (Mem, SLC, eMLC) 10x Faster ©Copyright 2016 Tegile Systems Inc. All Rights Reserved. Company Confiden0al 10x Simpler 3 10x More Efficient #compromisenothing About Tegile Founded: 2010 Backed up major investors: Global Presence: 300+ employees across major continents 250+ global business partners Diverse base of 1500+ enterprise customers with 2000+ systems deployed across a broad range of business applications Industry Recognition & Partnerships: Comprehensive Customer Care: Our Mission: Transform IT by transforming enterprise storage Tegile Named “Visionary” in MQ for GP Disk Arrays Tegile Named “Visionary” in MQ for Solid State Arrays ©Copyright 2016 Tegile Systems Inc. All Rights Reserved. Company Confiden0al Storage Company of the Year 4 #compromisenothing Industry Leading All-flash and Hybrid Portfolio IntelliCare™ Flash 5 Guarantee Intelligent Flash Arrays™ All-flash & Hybrid...

Words: 1330 - Pages: 6