Create an array of customer names

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

Basic Processing Tasks

In preparation for more complex data processing tasks using object-oriented objects that you will create in up-coming units, in this unit you will utilize arrays to build some basic processing logic and structures. This unit will not require you to do "object-oriented" programming per se, but you will utilize basic C# programming structures.

- You are expected to follow the "General Directions" found in the "Course Project Instructions" link on our course page.

- In a production program you would need robust error checking and user input validation, to provide your user with a complete menu system, and to make sure that there were no conditions in which your program would end unexpectedly (i.e. you would want to catch and handle all error conditions). However, this program is a prototype of various tasks, not a production program. At this point I do not expect advanced error checking, complicated menus, etc.; just carry out the tasks asked of you, based on the requirements of the program.

Your tasks for Unit 2 are:

• 1) Customers: Create an array of customer names. (For this Unit, you should store first and last names in one field, in the format "Last_name, First_name".) Populate the array with 4 to 6 customer names, entering the names in "non-alphabetical" order. (Note: In order to practice receiving user-input and adding elements to your program, you will allow the user to add one customer to your array when your program runs. Thus your array only needs to be one item larger than the number of customers you pre-load. Obviously in a production program you would need to allow your customer list to grow, most likely using a database.)

• For the Customer array, create a program to demonstrate the following tasks:
o Prompt the user for a new customer name; add the name to the array (in an empty location).
o Tell the user how many customer names are in the array. (See Note #1 in Programming Notes below.)
o Sort the array alphabetically.
o Print the sorted results.
o Prompt the user for a customer name to search for; if the name is in the array, print it; if not, indicate so. Continue prompting the user for more user names to search for until the user indicates they no longer want to search for any more names. (You choose the way for the user to indicate this, whether they enter the word "end" or something else you decide on. Make sure you inform the user how to use your program!)

• 2) Boat Slips: Create an array of numbers, representing slip numbers.
• For the Boat Slip array, create a program to demonstrate the following tasks:
o Populate the array with some numbers. (Note: the slip number array will not need to grow or have additions after it is defined and initially populated.)
o Prompt the user for a slip number to search for; if the number is in the array, print it; if not, indicate so.
o Indicate to the user that (rather than searching for one slip) they can print out a list of all slip numbers; tell them how and do so if they choose to.
o Continue prompting the user for more slip numbers to search for until the user indicates they no longer want to search. (You choose the way for the user to indicate this, whether they enter the word "end" or something else you decide on. Make sure you inform the user how to use your program!)

• 3) Slip Rental Amount: Create an array of numbers, representing the amount each slip is rented for (monthly). Populate the array with some dollar amounts (with two decimal places). (Note: the slip amounts array will not need to grow or have additions after it is defined and initially populated; however, it should have the same number of entries as the boat slip number array above.)
• For the Slip Rental array, create a program to demonstrate the following tasks:
o Print out each of the monthly rental amounts shown in currency format.
o Display the total amount that all slips rent for (i.e. sum of all numbers in the array) in currency format. (See Note #2 in Programming Notes below.)

o (For this exercise, slip rental amounts do not yet need to be associated with a slip number.)

Unit 2 Programming Notes:

1. For determining the total number of Customers, you can either keep track if it programmatically (i.e. a variable you set and update), or you can determine it on-the-fly.
2. To print the "currency" for slip rental amounts, you will want to use the methods talked about in the "Formatting Floating-Point Values" section on page 56 ff. of your textbook.
Unit 2 Deliverables:
• A C# program file that creates the customer name array and carries out the tasks indicated above.
• A C# program file that creates the slip number array and carries out the tasks indicated above.
• A C# program file that creates the slip rental array and carries out the tasks indicated above.

Reference no: EM13325294

Questions Cloud

Write a c# program containing array that holds five integers : Write a C# program containing an array that holds five integers. Assign values to the integers.Display the integers from first to last, and then display them from last to first. Save theprogram as IntegerList.cs.
How far has the car gone : A car starts from rest and travels for 4.92 s with a uniform acceleration of +1.49 m/s2. How far has the car gone
Find the total electric flux through the surface of shell : A particle with charge of 16.1 µC is placed at the center of a spherical shell of radius 29.0 cm. find the total electric flux through the surface of the shell
Determine the magnitude of the dipole moment : Two point charges, q1 = 2.0 pC and q2 = -2.0 pC, are separated by 3.6 µm. What is the magnitude of the dipole moment
Create an array of customer names : In preparation for more complex data processing tasks using object-oriented objects that you will create in up-coming units, in this unit you will utilize arrays to build some basic processing logic and structures.
Explain binary compounds by the oxidation number of hydrogen : Classify each of the following binary compounds by the oxidation number of hydrogen. NH3 CaH2 MgH2 H2O HCl NaH H2 CH4
Compute the roi tundra services company : Compute the return on investment (ROI) for Tundra Services Company. (Round your intermediate calculations and final answer to 2 decimal places and compute the return on investment (ROI) for each division, using the formulas stated in terms of marg..
How long does the filling take : A bottle with a volume of 194 U. S. fluid gallons is filled at the rate of 1.9 g/min. How long does the filling take
Explain what is the solubility of agcl : The Ksp of AgCl is 1.6 x 10-10. What is the solubility of AgCl in 0.010 M AgNO3? Give your answer using scientific notation and to 2 significant figures

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Program that asks the user to enter the monthly costs

write a program that asks the user to enter the monthly costs for the following expenses incurred from operating his or her automobile:

  Write a program that computes the cost of long distance call

Write a program that computes the cost of a long distance call. The cost of the call is determined according to the following rate schedules.

  Calculate and display the number of units of electricity

The manager of PG&E wants a program that calculates a customer's electric bill. He will enter the current and previous meter readings.

  Declare a vector

Declare a vector of these structures where the size of the vector is to be 7.

  Generates a random number and asks the user

Write a program in c++ that generates a random number and asks the user to guess what the number is. If the user's guess is higher than the random number

  Write a function sum3darray

Write a function sum3DArray. This function will take a three dimensional array of ints and add all the entries in the three dimensional array. Assume columns and rank are two constants already defined.

  We would like to use linear interpolation

Assume that we would like to use linear interpolation to determine the coefficient of lift for additional flight-path angles that are between -4 degrees and 21 degress. write a program that allows the user to enter the data for two points and a.

  Write a c program to compute dr if f1=50 lb and f2 = 4000

make a program for:A hydraulic lift as shown below from fluid mechanics, it can be shown that a small force F1     acting over a piston of diameter D 1    can be multiplied into a large force   F 2    acting over a piston of diameter D 2  .

  Each has a string for their name

Create a class in C++ that holds robot warriors. Each has a string for their name, a number of hitpoints (an float), armor (a defensive modifier(an int)), and weaponry (an offensive multiplier(another int)). You will create 5 robots with a random ..

  Write a program the contains an array of 1000 elements name

Write a function named equals() that accepts two char arrays and return true if both arrays have the same characters in the same order. The function should return false otherwise. Write a simple main() function to test your function.

  Sort an array of elements using the quick sort algorithm

Sort an array of 10,000 elements using the quick sort algorithm as follows: sort the array using pivot as the middle element of the array

  Write a for loop that adds the integers

Assume the int variables i , lo , hi , and result have been declared and that lo and hi have been initialized. Write a for loop that adds the integers between lo and hi (inclusive), and stores the result in result .

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