Explain reverse, sort and binary search

Assignment Help Programming Languages
Reference no: EM13936045

Because an array is an object it must be declared using the new operator: int[ ] myarray = new int[5]; or it could be declared and initialized statically using the format

int[ ] myarray = {1, 3, 5, 7, 9};

Because the C# array is an object member of the Array class it also comes with a number of built-in methods such as Reverse, Sort and Binary Search. You can use the Reverse method

ACTUAL ASSIGNMENT REQUEST IS AS FOLLOWS:

[Assignment3_yourlastname.cs] Create a program that includes the following requirements:

1. Create an accounts class

2. Private class members for:

an array of 5 account numbers

an array of 5 account balances (currency)

an array of 5 account names (last name)

3. Public class methods:

a method to fill all three parallel arrays by keyboard inputs

a method to search the account number array and display

when found, the account number entered at the keyboard along with the corresponding balance and last name

if nothing is found for the account number entered display "You entered an invalid account" on the console

a method to compute and display the average of all 5 balances as currency (you must use the array's Length property at least once in this method)

4. In Main:

Instantiate one new accounts object

call the class method that will fill the accounts array

a menu detailing entries to select search (a or A), average (b or B) or exit (x or X)

accept an entry from the keyboard and use a while-loop to allow the user to make selections until an x or an X is entered

when an x or an X is entered terminate the while loop

5. Internal Documentation.

POSSIBLE OUTPUT SHOULD LOOK SOMETHING ALONG THE LINES OF THE FOLLOWING EXAMPLE:

Enter the integer account number 1

Enter the account balance 1111

Enter the account holder last name Stutte

Enter the integer account number 2

Enter the account balance 2222

Enter the account holder last name Stanton

Enter the integer account number 3

Enter the account balance 3333

Enter the account holder last name Staton

Enter the integer account number 4

Enter the account balance 4444

Enter the account holder last name Stiles

Enter the integer account number 5

Enter the account balance 5555

Enter the account holder last name Stone

*****************************************

enter an a or A to search account numbers

enter a b or B to average the accounts

enter an x or X to exit program

*****************************************

Enter an option ---> B

The average dollar amount for the accounts is: $3,333.00

*****************************************

enter an a or A to search account numbers

enter a b or B to average the accounts

enter an x or X to exit program

*****************************************

Enter an option ---> 4

you entered an incorrect option

*****************************************

enter an a or A to search account numbers

enter a b or B to average the accounts

enter an x or X to exit program

*****************************************

Enter an option ---> A

Enter an account number to search for 4

Account # 4 has a balance of $4,444.00 for customer Stiles

*****************************************

enter an a or A to search account numbers

enter a b or B to average the accounts

enter an x or X to exit program

*****************************************

Enter an option ---> X

Press any key to continue

PLEASE COMPILE AND RUN TO ENSURE CODE IS CORRECT BEFORE SENDING

Reference no: EM13936045

Questions Cloud

When the visual dss first starts up : In the first part of assessment, there are three questions which should be done by DSS Visual software according to the criteria. I am also going to attach the requirement criteria of the assignment,so please have a look very carefully because i a..
Main( ) function that instantiates one average object : Main( ) function that instantiates one Average object, and includes a for loop to take 10 inputs and calls to the calculation and output method.
Do you think that the prevailing one-year forward rate : Do you think that the prevailing one-year forward rate of Freeland's currency (the fre) would overestimate, underestimate, or be a reasonably accurate forecast of the spot rate one year from now?
What is the total purchase of tennis racquets : What is the total purchase of tennis racquets? Why? What is the consumer surplus? Why? What is the increase in consumer surplus when the market price drops to $ 50?
Explain reverse, sort and binary search : Because the C# array is an object member of the Array class it also comes with a number of built-in methods such as Reverse, Sort and Binary Search. You can use the Reverse method
Evaluate and analyse the leadership of a 21st century : Please read the brief and instructions thoroughly. Using relevant theories and models critically evaluate and analyse the leadership of a 21st century leader of a (business, government or not-for-profit) organisation.
Find total revenue and marginal revenue in both situation : The radio advertisement costs $600 a month (30 days), find the firm's profit per case of energy drink (hint: consider daily advertisement cost)
Online education proving to be successful : Is online education proving to be successful? Your task is to provide a critical review of the current market for online education as well as providing an overview and definition of what online education is and how it works.
Evaluate the organisational and national cultural issues : Identify and evaluate the organisational and national cultural issues that you may have to deal with on assuming responsibility for the new manufacturing facility.

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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