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
Your task is to identify three or more ways that big data is being collected on a regular basis, including one data collection m
attashe74 [19]

Answer:

Data is one of the most valuable resources today's businesses have. ... There are various data-gathering methods you can use with the help of your ... When it comes to data businesses collect about their customers, ... Third-party data offers much more scale than any other type of data, ... Big White Cursor.

Explanation:

4 0
3 years ago
Which of the following is a group of computer systems and computing hardware devices linked together through various communicati
Art [367]
Digital network, as it refers to the series of connected and linked computing devices into a network as described in this question.
6 0
2 years ago
Where can students quickly locate a list of current classes?
Olenka [21]
In the front office or if your school has student vue it would be on the first page if online school just scroll down to classes
4 0
3 years ago
. Differentiate between Radio waves and Microwaves
ankoles [38]
Well you listen to a radio and you put food in a microwave
7 0
3 years ago
Provide code to create a selection list named orderDay containing the values and option text SAT and SUN placed in the Weekend o
harina [27]

Answer:

<!DOCTYPE html>

<html lang="en">

<head>

<!--title for web page -->

<title>Question 1</title>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

</head>

<body>

<!-- Creation of selection list -->

<select name="orderDay">

<!-- Creation of Weekday option group-->

<optgroup label="Weekday">Weekday</optgroup>

<option value="MON">MON</option>

<option value="TUE">TUE</option>

<option value="WED">WED</option>

<option value="THU">THU</option>

<option value="FRI">FRI</option>

<!-- Creation of Weekend option group-->

<optgroup label="Weekend">Weekend</optgroup>

<option value="SAT">SAT</option>

<option value="SUN">SUN</option>

</select>

</body>

</html>

Explanation:

The above code can be saved as orderDay.html. When it is clicked open it opens into a browser where we have an output which is a dropdown box showing the days under the weekday group and the days under the weekend opton group.

6 0
3 years ago
Other questions:
  • The system administrator in your office quits unexpectedly in the middle of the day. It's quickly apparent that he changed the s
    10·1 answer
  • Why is color theory important
    6·2 answers
  • Which categories format cells
    14·2 answers
  • To prevent unauthorized access and use, at a minimum a company should have a written __________ that outlines the activities for
    6·1 answer
  • So I was wondering how I should get into Game Development?
    12·1 answer
  • Please help me with this question. I don’t get it
    11·2 answers
  • hello my friend is doing a give away at 100 followers would you follow him for a chance to win 2000 vbucks his name is ZoVa_Velo
    15·2 answers
  • Write an expression using membership operators that prints "Special number" if special_num is one of the special numbers stored
    12·1 answer
  • Select the correct answer.
    8·2 answers
  • Write a program that repeatedly reads in integers until a negative integer is read. The program keeps track of the largest integ
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!