1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Vlada [557]
3 years ago
11

The str method of the Bank class returns a string containing the accounts in random order. Design and implement a change that ca

uses the accounts to be placed in the string by order of name. (Hint: You will also have to define some methods in the SavingsAccount class.) Grading When you have completed your program, click the Submit button to record your score.
Computers and Technology
1 answer:
Anna007 [38]3 years ago
8 0

Answer:

using namespace std;

// function to print string in sorted order

void sortString(string &str)

{

  sort(str.begin(), str.end());

  cout << str;

}

// Driver program to test above function

int main()  

{

   string s = "pleaseordertheaccounts";

   sortString(s);

   return 0;

}

Explanation:

<em>It can also work like:</em>

using namespace std;

int main()

{

       char str[5][20], t[20];

       int i, j;

       cout<<"\n Enter Any Five Names : \n\n";

       for(i=0; i<5; i++)

       {

               cout<<" ";

               cin>>str[i];

       }

       for(i=1; i<5; i++)

       {

               for(j=1; j<5; j++)

               {

                       if(strcmp(str[j-1], str[j])>0)

                       {

                               strcpy(t, str[j-1]);

                               strcpy(str[j-1], str[j]);

                               strcpy(str[j], t);

                       }

               }

       }

       cout<<"\n Names Sorted in Alphabetical Order : \n\n";

       for(i=0; i<5; i++)

       {

               cout<<" ";

               cout<<str[i]<<"\n";

       }

       return 0;

}

You might be interested in
Show that ALLDFA is in <img src="https://tex.z-dn.net/?f=%5Cmathrm%7BP%7D" id="TexFormula1" title="\mathrm{P}" alt="\mathrm{P}"
Alexandra [31]

Answer:

Hypothesis testing is a vital process in inferential statistics where the goal is to use sample data to draw conclusions about an entire population. In the testing process, you use significance levels and p-values to determine whether the test results are statistically significant.

Explanation:

yup it is write

3 0
1 year ago
Imagine a typical website that works as a storefront for a business, allowing customers to browse goods online, place orders, re
Gwar [14]

Answer: See explanation

Explanation:

Following the information given in the question, the testing process for the website will include testing the links that are on the site.

Another that ng to test is to check if the menus and the buttons are working properly. Furthermore, the layout should be ensured that it's consistent as well as the ease with which the website can be used.

5 0
3 years ago
Sharon is thinking about opening a bakery. She knows she wants to set her own hours, reduce her stress and make a profit. But sh
kondaur [170]
C would not be a beginner move.

hope it helps
6 0
3 years ago
Divide the difference of 47 and 23 by the difference of 25 &amp;13​
OleMash [197]

Answer:

The answer is 2

Explanation:

3 0
3 years ago
You should always buy the biggest camera bag that you can find for extra equipment.
Akimi4 [234]

Answer:

true

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • Suppose that cells B1 through B100 of an Excel spreadsheet contain the quantity of units ordered on each of 100 different days.
    13·1 answer
  • Before using the data type string, the program must include the header file ____.
    6·1 answer
  • Siva added a "Contact Form" to her website.
    10·1 answer
  • What is the recommended secure protocol for voice and video applications? secure real-time transport protocol (srtp) hypertext t
    9·1 answer
  • What is a good way to minimize technical problems with your computer
    10·1 answer
  • Which of the following statements can be used as evidence that ancient Greek beliefs and art has been influential? Select the th
    9·2 answers
  • How can officers in the armed services receive college educations? Select the best answer choice. A. All of the answers are corr
    11·1 answer
  • What do you like and dislike about school? ANDWER FAST!!!
    5·2 answers
  • Powerful IT security systems are needed to defend against what appears to be authorized access to a network or application. Sele
    6·1 answer
  • Which feature of REPL.it would you use to transmit your program to a friend?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!