Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Goal: Your assignment is to write a C++ program to read in a list of phone call records from a file, and output them in

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Goal: Your assignment is to write a C++ program to read in a list of phone call records from a file, and output them in a more user-friendly format to the standard output (cout). In so doing, you will practice using the ifstream class, L/O manipulators, and the string class. File format Here is an example of a file containing three phone call records: 1 20160101120000 20160101120015 +12062812000 2 20160508115512 20160508121513 +86698974534 3 20160229182110 20160229190005 +12025551234 4 20170131235500 20170131235532 +50499853746 5 20181231011515 20181231022432 +13257744661 6 20190505060000 20190505061559 +15067845191 Each line records one phone call. As you can see, each line contains 3 different fields: start, end, and a phone number Here is an explanation of these three fields: Start, end: A 14-digit field giving the year, month, day, hour, minute, and second when the call was started. The format is yyyymmddhhmmss. Military time is used for the hour. For instance, 20180101011020, means the date was January 1, 2018 and the time was 20 seconds past 1:10 am. Phone number E.164: A 12-character field starting with a +sign followed by 11 digits. This field specifies the phone number in E.164 format. The first 1-3 digits after the +sign specify the country code of the phone number, and the meaning of the remaining digits is specific to the country or region represented by the country code To limit the scope of this assignment we will only consider E.164 phone numbers from the following regions CC Region North America (US, Canada, and some Caribbean islands) 502 Guatemala 503 El Salvador 504 Honduras 505 Nicaragua 506 Costa Rica 886 Taiwan We've picked these regions because they have simple 12-digit E.164 formats. Goal: Your assignment is to write a C++ program to read in a list of phone call records from a file, and output them in a more user-friendly format to the standard output (cout). In so doing, you will practice using the ifstream class, L/O manipulators, and the string class. File format Here is an example of a file containing three phone call records: 1 20160101120000 20160101120015 +12062812000 2 20160508115512 20160508121513 +86698974534 3 20160229182110 20160229190005 +12025551234 4 20170131235500 20170131235532 +50499853746 5 20181231011515 20181231022432 +13257744661 6 20190505060000 20190505061559 +15067845191 Each line records one phone call. As you can see, each line contains 3 different fields: start, end, and a phone number Here is an explanation of these three fields: Start, end: A 14-digit field giving the year, month, day, hour, minute, and second when the call was started. The format is yyyymmddhhmmss. Military time is used for the hour. For instance, 20180101011020, means the date was January 1, 2018 and the time was 20 seconds past 1:10 am. Phone number E.164: A 12-character field starting with a +sign followed by 11 digits. This field specifies the phone number in E.164 format. The first 1-3 digits after the +sign specify the country code of the phone number, and the meaning of the remaining digits is specific to the country or region represented by the country code To limit the scope of this assignment we will only consider E.164 phone numbers from the following regions CC Region North America (US, Canada, and some Caribbean islands) 502 Guatemala 503 El Salvador 504 Honduras 505 Nicaragua 506 Costa Rica 886 Taiwan We've picked these regions because they have simple 12-digit E.164 formats

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What are the characteristics of an effective business model?

Answered: 1 week ago

Question

4. Identify cultural variations in communication style.

Answered: 1 week ago

Question

9. Understand the phenomenon of code switching and interlanguage.

Answered: 1 week ago

Question

8. Explain the difference between translation and interpretation.

Answered: 1 week ago