Thread: C++ Assignments

Results 1 to 3 of 3
  1. #1
    [Raindrops]'s Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    6

    C++ Assignments

    Basically, I don't have time to learn how to do these c++ programs right now. Willing to pay $30 to whoever does them for me and sends me a txt file with all the correct code for each problem.

    Problem 1

    Create a text file named dataOne.txt and store 10 integers, each of which is between -20 and 50.

    Write a program that reads data from dataOne.txt file into an array and then displays the following:

    1. minimum value stored in the array

    2. index of the minimum value stored in the array.

    3. number of positive values in the array.

    Problem 2

    Create a text file named dataTwo.txt and store 10 integers, each of which is between -20 and 50.

    Write a program that reads data from dataTwo.txt file into an array and then displays the following:

    1. Print all the element in the array

    2. Replace all the negative numbers in the array with their absolute values and then print the modified array.

    Problem 3

    Create a text file named dataThree.txt and store 10 integers, each of which is between 1 and 50. Do not include duplicate values.

    Write a program that reads data from dataThree.txt file into an array.

    Prompt the user to enter an integer between 1 and 50. Use a loop to validate the user input and prompt the user to enter a correct input if the input is invalid.

    When the user enters a valid input, check if it is one of the elements of the array (values read from the text file). If it is, then display an appropriate message. Otherwise, display the message "Value not found".

    Problem 4

    Write a program that can be used to assign seats for a small airplane. The airplane has 13 rows, with 3 first class seats (seats 1-3), 4 business class seats ( seats 4 - 7), and 6 economy class seats (8 - 13).

    Your program must prompt the user to enter the following:

    Please enter ticket type ( 1 for first class, 2 for business class, or 3 for economy class)
    If the user enters 1, your program should assign a seat in the first class section.
    If the user enters 2, your program should assign a seat in the business class section.
    If the user enters 3, your program should assign a seat in the economy class section.
    Your program should print a boarding pass indicating the person's seat number and whether it's in the first class, business class, or economy class of the plane.

    Use a one-dimensional array to represent the seating chart of the plane. Initialize all the elements to 0 indicating that all the seats are empty. As each seat if assigned, set the corresponding element of the array to 1 to indicate that the seat is no longer available.

    Your program should not assign a seat that has already been assigned.

    When the first class section is full, your program should ask the person if it's acceptable to be placed in other sections. If yes, then make the appropriate seat arrangement. If no, then print the message "Next flight leaves in 2 hours".

    Create a folder named assignment5 and place all the files in that folder.

    Problem 5

    Write a program to calculate the monthly payment of a loan.

    Construct a Loan class with four variables: principal (loan amount), rate (rate per year), term (total number of payments/months), and payment (monthly payment).
    Create appropriate constructor(s) to initialize the loan.
    Create the regular getters and setters member functions.
    Use the following formula to calculate the monthly payment:
    Monthly payment = principal*rate/((1- X)*12)

    where X = pow((1+rate/12), - term)

    Separate class specification and implementation into different files. Put class specification into a .h file, and class implementation into a .cpp file, and main function into another .cpp file.
    Compile and run your program. Debug and test your program to make sure your program works properly.
    Your program should prompt the user to enter the loan amount (principal), interest rate, and term (total number of months/payments). Then it should calculate and display the monthly payment.

    Use the following test cases:

    Principal = $150000

    Rate = 0.0375 (3.75%)

    Term = 360 ( 30 years)

    Monthly payment = $694.67

    Principal = $18000

    Rate = 0.023 (2.3%)

    Term = 13 ( 13 months)

    Monthly payment = $1403.26

    Add me on skype: mpgh_raindrops

  2. #2
    ChasingCarsEU's Avatar
    Join Date
    Oct 2016
    Gender
    male
    Posts
    85
    Reputation
    10
    Thanks
    4
    I have added you on Skype, can easily complete this for you.

  3. #3
    [Raindrops]'s Avatar
    Join Date
    Jun 2016
    Gender
    male
    Posts
    25
    Reputation
    10
    Thanks
    6
    bump /tooshort

Similar Threads

  1. HELP ASSIGNMENT DUE TOMOZZ
    By [AMY] in forum Homework & Learning Section
    Replies: 8
    Last Post: 08-23-2010, 11:37 AM
  2. [SOLVED] Assign MW2 to a new steam account
    By thesabor in forum Call of Duty Modern Warfare 2 Help
    Replies: 3
    Last Post: 06-11-2010, 10:05 PM
  3. Art Assignment...
    By R3V in forum Art & Graphic Design
    Replies: 8
    Last Post: 03-27-2010, 05:35 PM
  4. Homework assignment
    By Obama in forum General
    Replies: 5
    Last Post: 06-05-2009, 02:28 PM
  5. Assign 8 Addresses To One Command (VB-6)
    By Trixiez in forum WarRock - International Hacks
    Replies: 8
    Last Post: 06-05-2007, 03:36 PM