Can Someone help me regarding my C++ Assignments? I'll list the questions below:
ASSIGNMENT 1
Assume the array in the following table represents the monthly rental price of six resort cabins over a five-year period.
YEAR
2005 2006 2007 2008 2009
1 200 210 225 300 235
2 250 465 343 255 344
CABIN 3 233 333 453 268 365
4 200 325 400 333 222
5 200 160 642 674 358
Write a program that employs functions to perform the following tasks:
i. Fill a two-dimensional array with the above table
ii. Compute the total rental income for each cabin by year and store the yearly totals in a second array.
ASSIGNMENT 2
An International Standard Book Number (ISBN) is a code of 10 characters separated by dashes such as 0-8065-0959-7.
An ISBN consists of four parts : a group code, a publisher code, a code that uniquely identifies the book among those published by the particular publisher, and a check character.
For the ISBN 0-8065-0959-7, the group code is 0, which identifies the book as one from and English-speaking country.
The publisher code 8065 identifies the book as one published by Citadel Press. The code 0959 uniquely identifies the book among those published by Citadel Press ( Brode: Woody Allen : His Films and Career, in this case ).
The check character is computed as follows: First compute the sum of the first digit plus two times the second digit plus three times the third digit,……, plus nine times the ninth digit. The last character is the remainder when the sum is divided by 11. If the remainder is 10, the last character is X which is considered as invalid ISBN number. For example, the sum for the ISBN 0-8065-0959-7 is 0 + 2*8 + 3*0 + 4*6 + 5*5 + 6*0 + 7*9 + 8*5 + 9*9 = 249. The remainder when 249 is divided by 11 is 7, the last character in the ISBN. The check character is use to validate an ISBN.
Write a program that uses one function that receive one parameter s that is an array of characters. The function returns 1 (true) if the array represents a valid ISBN and 0 (false) otherwise.
ASSIGNMENT 3
Write a modular program (function) for problem given below.
This program will let you enter the initial balance for the month, followed by a series of transactions. There is no limit on the number of transactions the program can process. A transaction takes the form of two input values: a single letter, followed by a float number. If the letter is:
C, then the number is the amount for a check (withdrawal)
D, then the number is the amount for a deposit
E, this is a sentinel value to signal the end of input
For each transaction entered, the program will echo-print the transaction data, the current balance for the account ( not including deductions for service charges ), the service charge for the transaction, and the total accumulated service charges for all transactions. After the end sentinel is processed, the program will print the current balance, total service charges, and the closing balance (balance after deducting service charges ).
Service charges are:
• Check fee : $0.15 for each check (withdrawal )
• Deposit fee : $0.10 for each deposit
• Low balance fee : if the balance drops below $500.00 at any point during the month, a service charge of $5.00 is assessed for the month ( one time only ).
• If the balance drops below $50.00, the program prints a warning message, but no fee is charged.
• Overdrawn balance fee : if the balance becomes negative, an additional service charge of $10.00 must be assessed for each check until the balance becomes positive again.
ASSIGNMENT 4
ASSIGNMENT 6 (ARRAYS)
Write a program to assign passengers seats in an airplane. Assume a small airplane with seat numbering as follows :
1 A B C D
2 A B C D
3 A B C D
4 A B C D
5 A B C D
6 A B C D
7 A B C D
The program should display the seat pattern, with an 'X' marking the seat already assigned. For example, after seats 1A, 2B, and 4C are taken, the display should look like :
1 X B C D
2 A X C D
3 A B C D
4 A B X D
5 A B C D
6 A B C D
7 A B C D
After displaying the seats available, the program prompts for the seat desired, the user types in a seat, then the display of available seats is updated. This continues until all seats are filled or until the user signals that the program should end. If the user types in a seat that is already assigned, the program should say that the seat is occupied and ask for another choice.