UESTION PROVIDED IN ATTACH IMAGE KINDLY SEE. 2) SAMPLE INPUT AND OUTPUT PROVIDED AT END PLEASE SEE. 3) IF THERE IS A DECIMAL IN OUTPUT WHETHER IT'S ZERO OR TWO PLACE DECIMAL YOU MUST MATCH AS IT IS WITH QUESTION OUTPUT NO MISMATCH IN OUTPUT ACCEPTED AND BELOW TEMPLATES PROVIDED CHECK THIS BEFORE MAKING SOLUTION ( main.cpp , ADDRESS.cpp ) ----------------- TEMPLATES BELOW FOR SOLUTION -----------------------

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

1) QUESTION PROVIDED IN ATTACH IMAGE KINDLY SEE.

 

2) SAMPLE INPUT AND OUTPUT PROVIDED AT END PLEASE SEE.

 

3) IF THERE IS A DECIMAL IN OUTPUT WHETHER IT'S ZERO OR TWO PLACE DECIMAL YOU MUST MATCH AS IT IS WITH QUESTION OUTPUT NO MISMATCH IN OUTPUT ACCEPTED

 

AND BELOW TEMPLATES PROVIDED CHECK THIS BEFORE MAKING SOLUTION ( main.cpp , ADDRESS.cpp  )

----------------- TEMPLATES BELOW FOR SOLUTION -----------------------

main.cpp 

#include<iostream>
#include<string.h>
#include<iomanip>
#include<stdio.h>
#include<cstdio>
#include "Address.cpp"
using namespace std;
int main() {
int n;
cout<<"Number of details\n";
cin>>n;

//Fill your code here

return 0;
}

 

 

Address.cpp

#include<string.h>
#include<iostream>
#include <stdio.h>
using namespace std;
class Address
{
private:
string addressLine1;
string addressLine2;
string city;
string state;
int pincode;

public:

//Fill your code here

void display(Address obj[], int n){
//Fill your code here
}
};

------------TEMPLATE END-------------

SAMPLE INPUT AND OUTPUT BELOW

[All text in bold corresponds to input and the rest corresponds to output]
 
Number of details
2
Enter Address Details 1:
Enter Line1
Cisive
Enter Line2
Corporate Court
Enter City
Holtsville
Enter State
NewYork
Enter Pincode
501
Enter Address Details 2:
Enter Line1
Amphisoft Technologies
Enter Line2
Gandhipuram
Enter City
Coimbatore
Enter State
TamilNadu
Enter Pincode
641037
Address Details:
 
AddressLine1                    AddressLine2         City                  State            Pincode
Amphisoft Technologies   Gandhipuram        Coimbatore    TamilNadu     641037
Cisive                                Corporate Court     Holtsville        NewYork        501
Chandler's company completed its 25 years of service successfully. To celebrate this grand occasion
they want to throw a party and invite all the employees as well as the alumni of the company. So
Chandler has been assigned the duty to make a list of the current address of all the people to be invited
to the party in a perfect manner so that it is easy to send the invitations. He is confused about how to
sort the addresses just when his good friend Joey comes up with an idea to print addresses in a
particular order using the 'printf method and display them in ascending order.
Strictly adhere to the Object-Oriented specifications given in the problem statement. All class
names, member variable names, and function names should be the same as specified in the problem
statement.
Write a C++ program to get the address details of the companies from the user and to display the
address details in ascending order based on the company name. Use the given specified format to
display the details.
Create a class called Address with the following private member variables
Data type
string
string
string
string
int
Variable
addressLine1
addressLine2
city
state
pincode
Include appropriate default and parameterized constructors with parameters passed in the same order
as declared in the class.
Include following member function and constructor in Address class
Member Function
Description
This method is used to display the Address details in ascending order.
Use printf("%-25s%-25s%-25s%-25s%-25d\n",addressLine1, addressLine2,city,state,pincode)
to display the address details as the specified format.
void display(Address objl], int n)
In the main method, obtain input from the user in the console and create an array of an object for
Address and assign the values to the object's members.
Display the details by calling the display method.
Print the string "Address details:" and use "%-25s%-25s%-25s%-25s%-25s\n" to print the table header in the
specified format in the main method itself.
Input and Output format:
The input consists of address details of the companies.
Display the address details in ascending order based on the company name.
Refer sample Input and Output for formatting specifications.
Transcribed Image Text:Chandler's company completed its 25 years of service successfully. To celebrate this grand occasion they want to throw a party and invite all the employees as well as the alumni of the company. So Chandler has been assigned the duty to make a list of the current address of all the people to be invited to the party in a perfect manner so that it is easy to send the invitations. He is confused about how to sort the addresses just when his good friend Joey comes up with an idea to print addresses in a particular order using the 'printf method and display them in ascending order. Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. Write a C++ program to get the address details of the companies from the user and to display the address details in ascending order based on the company name. Use the given specified format to display the details. Create a class called Address with the following private member variables Data type string string string string int Variable addressLine1 addressLine2 city state pincode Include appropriate default and parameterized constructors with parameters passed in the same order as declared in the class. Include following member function and constructor in Address class Member Function Description This method is used to display the Address details in ascending order. Use printf("%-25s%-25s%-25s%-25s%-25d\n",addressLine1, addressLine2,city,state,pincode) to display the address details as the specified format. void display(Address objl], int n) In the main method, obtain input from the user in the console and create an array of an object for Address and assign the values to the object's members. Display the details by calling the display method. Print the string "Address details:" and use "%-25s%-25s%-25s%-25s%-25s\n" to print the table header in the specified format in the main method itself. Input and Output format: The input consists of address details of the companies. Display the address details in ascending order based on the company name. Refer sample Input and Output for formatting specifications.
Expert Solution
steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Multimedia tools and applications
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education