Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

Intro to Programming in C Assignment

Since this is the last assignment, there will be no late submission.

All programs must be electronically submitted by 5:00pm on Tuesday, December 2nd with NO EXCEPTIONS in order to receive a grade.

With this assignment you will start to learn how to write a practical menu driven program that manages a list of data and implements a rudimentary database. You will use an array of structs to organize the data and you will read and save the information in a text.

The assignment is to write a menu driven program that manages a hotel registration system. You will use a structure to store the following customer information:

Customer First Name
Customer Last Name
Customer ID
Room #
Customer Current Charges (dollars and cents)
Customer Room Charge Limit (dollars and cents)

(Please remember that your structure must define member types that are appropriate for the given data!)

Your menu commands will include:
C) Customer Check-in
O) Customer Check-out
L) Customer List (to the screen)
D) Delete all customers
A) Add a Customer Room Charge
Q) Quit

Implementation Details:

· When the program begins, it will read the customer data list from the database (text file)

· When a new customer checks in, the program will ask the user for each of the fields on a separate line. The program must check to make sure a customer with the same ID does not already exist!

· When a customer checks out, the program will ask you for the customer id of the customer who is checking out. Locate the entry in the array and remove all of the data for that entry. The list does not need to be sorted - to remove an entry, you may move the last item in the list to the location of the deleted entry. The program must handle if the customer is not found.

· When you display the customer list on the screen, all of the information stored for each customer will be labeled and displayed.

· Deleting all customers "deletes" all of the information in the array by resetting each value to an appropriate default value. Remember this means setting the customer id to -1.

· When adding a customer charge, the program will ask for the customer id whose account the charge will be added to. The program should add the new charges to the old one and update the current room charges for the given customer (don't worry about going over the room's charge limit!). The program must handle if it cannot find the given customer id.

· When the program exits, it will write the current list to the database (text file).

Instructions:

· You should use at least 10 user-defined functions (plus main) to appropriately break the problem up into smaller pieces.

· You need to begin the program by reading the records from the database and displaying the number of records read in. After this the menu should be shown.

· You must use function prototypes and NO global variables.

· You must use a #define to set the upper bound of the list to at least 20 entries.

· Your code should be well designed, well commented and written with good style.

Other Important Hints and Reminders:

· Start work on this as soon as possible. We will work on it in class but DO NOT rely on this - we most likely will get sidetracked in discussions as they arise.

· You are expected to receive as much help as you need for the basic assignment.

· It is your responsibility to request this help in the form of specific questions.

· You may ask these questions by sending them via email to me or the lab TAs.

· When you ask a question, it should be specific, and you should provide the current version of your program.

· The current version of your program should be neatly formatted and commented. It should also be properly indented and use meaningful variable and function names. This will make it easier for anyone helping you to understand what you are trying to do.

NOTE: there will probably be no assistance with this assignment on the last weekend before the assignment or the morning it is due so DON'T leave this assignment to the last minute.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M92064955
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in C/C++

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As