Create and print out the two arrays

Assignment Help C/C++ Programming
Reference no: EM132107898

Programming Language: C++

Project  - Elevator

Objectives:

Use single arrays to solve a problem.

Use searching and sorting techniques on a single array.

Format output properly, according to the directions.

Use functions in a program to be able to reuse code.

Instructions:

Part I:

Create and print out the two arrays: (Be sure to do this first) You are allowed to hard code these arrays into your program. The data is as follows:

Anne                30

            Bob                  150

            Ralph               305

            Tim                  225

            Barbara           135

            Jane                 160

            Steve               80

            Tom                 200

            Mike                165

            Shirley             90

            Pam                 100

            Frank               120

Part II: The elevators in our building have an 1100 lb. load limit. Determine which people in the list above get on the elevator. Print their names, weights, total weight, and how many got on.

Part III: Rearrange these people in descending sequence by weight and print the two arrays. Determine again how many may ride the elevator, printing out their names, weights, total weight and the number of how many people got on.

Part IV: Rearrange these people in ascending sequence by name (USE A DIFFERENT SORT ALGORITHM THAN THE ONE YOU USED IN PART III) and print the two arrays. Determine again how many may ride the elevator, printing out their names, weights, total weight and the number of how many people got on.

Part V: Have the program determine which method allowed the most people to get on the elevator. The program should compare the three different counts of how many people got on the elevator.

This program should include:

2 sort methods

a method to determine how many people get on the elevator (will be called 3 times)

a print method which prints both arrays (include a size parameter and it can be called 6 times).

Make sure all methods are writen to handle n elements, not just 12. You can pass 12 from main to n in the method/function.

Run:

You only have to run this program once since the data is embedded in the program.

Reference no: EM132107898

Questions Cloud

Interest payments are made semiannually : The coupon rate is 7% and the interest payments are made semiannually. What is its YTM? (Show workings)
Return on equity for similar stocks : The dividend is expected to grow at a 7% annual rate. The return on equity for similar stocks is 14%. What is P0? (Show workings)
Write a recursive method : You will need to recurse on n/4 rather than n-1. That's because the method is called with some big values .
Difference between the cash cycle and the operating cycle : What is the difference between the cash cycle and the operating cycle? Under what condition would they be the same?
Create and print out the two arrays : Create and print out the two arrays: (Be sure to do this first) You are allowed to hard code these arrays into your program.
What could be the cause in the increase t the value : What does it mean to have a higher inventory turnover ratio (compared to the annual year before)? What could be the cause in the increase t the value?
Create a webpage similar to the one shown : Create a webpage similar to the one shown in Figure 12-25. The image on the webpage is stored in the VB2015\ Chap12\Carnival.png file.
Will you recommend someone to invest in it or not : Say that the company's current and quick ratios are 0.59 and 0.46 respectively, while its competitors' are 1.39 and 1.23?
Reports the total number of bearings : Reports the number of valid, invalid, good, bad, and total bearings after reading in each bearing size (e.g. within the loop).

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Write a switch-case statement

Create a script named 'descent.m'. Give a brief but concrete example when switch?case statements should be preferred to if? elseif statements. Use block comments to enter your answer in the script.

  What is realistic rendering in computer graphic

Differentiate between pillar boxing and the letter boxing. What is realistic rendering in computer graphic. Discuss the approach used in realistic rendering.

  Objectivein this assignment you read a list of employees

objectivein this assignment you read a list of employees from a csv file and convert them into corresponding objects.

  Determine which customers must be served

Write a program to determine which customers must be served from each field stations.

  How does a derived class override a base class method

Are there any restrictions on inheritance in Java that distinguish it from C++? How does a derived class override a base class method?

  The agricultural activities that contribute to a global

The agricultural activities that contribute to a global increase of greenhouse gases in the atmosphere.

  Create unix command using c

Create Unix Command using C. The purpose of this assignment is to use command line arguments and files in C so that a new command may be designed.

  Describe what an attribute or data member of a class

Analyze a basic set of requirements for a problem - Describe what an attribute or data member of a class - Distinguish between pass-by-value and pass-by-reference

  Write a function that accepts a pointer to a string

Write a function that returns an Integer and accepts a pointer to a string as an argument. The function should count the number of characters in the string and return that number.

  Who maintain exam scores of students in a class

The program performs two main functions for users like TAs and instructors, who maintain exam scores of students in a class

  Write a program that prints the day number of the year

Write a program that prints the day number of the year, given the date in the form month-day-year. For example, if the input is 1-1-2006, the day number is 1.

  Calculate the percentageand & add the percentage to a total

I need to declare 3 arrays. The first array will hold the employee ID. The second array will hold the amount of sales for that employee. Finally, the third array will hold the percentage of sales for each employee.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd