Coder Social home page Coder Social logo

debugging-demo's Introduction

Running the Program

Simply run with $ gcc main.c && ./a.out

Description

This program is a simple piece of software designed for managing a hotel. This particular hotel has 17 rooms, each of which can hold one guest. The hotel and guests are represented with the Hotel and Guest structs.

The program should print a summary of all occupied room numbers and the name of the guest in those rooms. Then, it should prompt the user to select one of 4 options.

  1. Check in: This option should prompt the user for guest details and a room number and then add a new guest to the given room. It can be assumed that a valid name and 10-digit phone number are given for the purposes of this program.
  2. Check out: This option should prompt the user for a room number and then remove the guest in the given room.
  3. Guest info: This option should prompt for a room number and then print the name and phone number of the guest in that room.
  4. Exit: Save the current hotel data to hotel.txt and exit.

Problems

  1. The code does not compile.
  2. When viewing certain phone numbers with option "Guest Info", the phone numbers are not displayed correctly. Furthermore, after exiting, these wrong phone numbers are stored instead of the correct ones.
  3. The check out option doesn't seem to work at all. It should remove the person in the given room number from the hotel so they are not printed in the next prompt.

debugging-demo's People

Contributors

rob-3 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.