#include using namespace std; class Account { public: int accno; string name; static int count; Account(int accno, string name) { ........................... ........................... ........................... } void display() {
#include <iostream>
using namespace std;
class Account {
public:
int accno;
string name;
static int count;
Account(int accno, string name)
{
...........................
...........................
...........................
}
void display()
{
...........................
...........................
}
};
int Account::count=0;
int main(void) {
//creating an object of Account named a1, whose name is Nominal and its ID is 201
.................................
//creating an object of Account named a2, whose name is Personal and its ID is 202
.................................
//creating an object of Account named a3, whose name is Real and its ID is 203
.................................
//Display the contents of Nominal account
.................................
//Display the contents of Personal account
.................................
//Display the contents of Personal account
.................................
cout<<"Total Objects are: "<<Account::count;
return 0;
}
![Complete the following C++ program to create new accounts. Note that static usage.
For example:
Result
201 Nominal
202 Personal
2
203 Real
3
Total Objects are: 3](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F179e412f-d2ba-476d-abba-c16bd8cdd585%2F1b0a20b6-b387-4d85-a26f-22c721d6368a%2Fvxffyig_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 4 steps with 2 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)