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]
4 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]4 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
How much cell phone data does the average person use a month?
Zarrin [17]
It is 2.9 GB a month
3 0
4 years ago
Read 2 more answers
.............................................is the vertical distance between successive lines of the text​
vladimir1956 [14]

Answer:

Line spacing is the vertical distance between successive lines of the text​.

Explanation:

Hope this helps you. :)

8 0
3 years ago
Which software program is used to create a database on a computer, add, change, and delete data in the database, and create quer
Radda [10]
I'd say Microsoft access
3 0
3 years ago
Read 2 more answers
I NEED HELP
lilavasa [31]
Well, if your asking about all types of meaning for play, I hope this works. Verb version: Play meaning 1: engage in activity for enjoyment and recreation rather than a serious or practical purpose. Meaning 2: take part in (a sport). Meaning 3: represent (a character) in a theatrical performance or a film. Meaning 4: perform on (a musical instrument). Noun version: meaning 1 of play: activity engaged in for enjoyment and recreation, especially by children. Meaning 2: the conducting of an athletic match or contest. Meaning 3: a dramatic work for the stage or to be broadcast. Meaning 4: the space in or through which a mechanism can or does move. Hope this helped!
8 0
4 years ago
If the catch-or-declare requirement for a checked exception is not satisfied ________. a. a stack trace will be displayed indica
irakobra [83]

Answer: I think the answer is B. the compiler will issue an error message indicating that the exception must be caught or declared.

Explanation:

7 0
3 years ago
Other questions:
  • The BIOS feature that enables a hard drive to read or write several sectors at a time is called what?
    5·1 answer
  • When you insert an object in a document, Word always inserts it as a floating object. true or false
    14·1 answer
  • In terms of computer networking. what is PING?
    5·1 answer
  • An example of java code for a sandwich shop menu
    13·1 answer
  • What device provides a strong magnetic field used to completely erase data on a hard drive or tape drive?
    5·1 answer
  • Which term is used to describe a public-key, cryptography-based mechanism for proving the source (and possibly integrity) of a d
    12·2 answers
  • Item 3
    15·1 answer
  • As a student, why do you need to know and follow the steps printing a <br><br>document?​
    6·2 answers
  • Pleaseeee Help.
    8·2 answers
  • Machine language is the set of binary-coded instructions that are executed directly by a computer. True or false
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!