Loading...

Messages

Proposals

Stuck in your homework and missing deadline? Get urgent help in $10/Page with 24 hours deadline

Get Urgent Writing Help In Your Essays, Assignments, Homeworks, Dissertation, Thesis Or Coursework & Achieve A+ Grades.

Privacy Guaranteed - 100% Plagiarism Free Writing - Free Turnitin Report - Professional And Experienced Writers - 24/7 Online Support

Phone book program implemented in c++

25/10/2021 Client: muhammad11 Deadline: 2 Day

Phone book application

Description In this assignment (HW4), you will implement a program that verifies the format of a list of phone numbers and prints the list in alphabetical order.

Phone book program specification The phone book program will read a list of names and phone numbers from a phone list file. The name of the phone list file will be given as a command line argument. The program will read entries from the phone list file and check that they conform to the format described below. It will print error messages and exit if the entries do not follow the expected format. If no format errors are found, it will print the phone list on standard output in alphabetical order by last name and first name, i.e. in such a way that entries are sorted by first name if last names are the same.

Phone list format A phone list file consists of one record per line. Each line consists of three tokens: a last name followed by a first name, followed by a phone number written in the format ddd-ddd-dddd where d is a digit in [0-9]. These three tokens are separated by one or more white spaces. The first name and last name tokens should consist of characters in the set [a-zA-Z]. It can be assumed that each line in the phone list file will contain three tokens. However, first names, last names and numbers may be incorrectly formatted.

Error conditions The following error conditions must be detected and reported by the phone book program: Missing phone list file If the file given as a command line argument is missing, the program should print file not found and exit. Invalid characters in the last name If the last name contains characters that are not in [a-zA-Z], the program should print invalid characters in last name and exit. Invalid characters in the first name If the first name contains characters that are not in [a-zA-Z], the program should print invalid characters in first name

and exit. Invalid number format If the phone number does not conform to the format “ddd-ddd-dddd” where d is a digit in [0,9], the program should print invalid number format and exit. Duplicate entries If an entry in the phone list has the same first name and last name as a previous entry, it should be ignored (even if the phone number is different). The above error messages should be printed on stdout. Do not use stderr.

Implementation The program must use a class Person that encapsulates the last name, first name and phone number of a person. The file Person.h is provided and should not be modified. Use the isalpha and isdigit functions in the implementation of the constructor of the Person class to check that the first and last names consist of characters in [a-zA-Z] and that the number contains digits and the character ’-’ in the appropriate places. The program should use the STL set container to store instances of persons. Use the property of the set container that elements are automatically sorted as they are inserted. You will have to define operator< for the Person class so as to properly order two persons who have the same last name but different first names. You can rely on lexicographical order as defined in the STL string class when comparing strings. Do not use C++11 or C++14 features in your source files.

HW4 Assignment You task is to implement the files Person.cpp and phonebook.cpp. The file phonebook.cpp should contain the main function. The Makefile is provided and should not be modified. The phonebook executable should be built using the command $ make You will use the phonebook executable and the phone list files and output test files provided on the web site http://web.cs.ucdavis.edu/~fgygi/ecs40/homework/hw4 to check the functionality of your program and verify that your program reproduces the test output exactly. Use the diff command to compare your output files with the reference test output files. Note that other test files may also be used when grading your implementation. The phonebook program takes a command line argument and writes to stdout. It can be used e.g. as $ ./phonebook list1.txt > list1.out

Submission Create a tar file named hw4.tar containing the files Person.h Person.cpp phonebook.cpp and Makefile . Submit your project using: $ handin cs40 hw4 hw4.tar

Applied Sciences
Architecture and Design
Biology
Business & Finance
Chemistry
Computer Science
Geography
Geology
Education
Engineering
English
Environmental science
Spanish
Government
History
Human Resource Management
Information Systems
Law
Literature
Mathematics
Nursing
Physics
Political Science
Psychology
Reading
Science
Social Science
Home

Homework is Completed By:

Writer Writer Name Amount Client Comments & Rating
Instant Homework Helper

ONLINE

Instant Homework Helper

$36

She helped me in last minute in a very reasonable price. She is a lifesaver, I got A+ grade in my homework, I will surely hire her again for my next assignments, Thumbs Up!

Order & Get This Solution Within 3 Hours in $25/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 3 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 6 Hours in $20/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 6 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

Order & Get This Solution Within 12 Hours in $15/Page

Custom Original Solution And Get A+ Grades

  • 100% Plagiarism Free
  • Proper APA/MLA/Harvard Referencing
  • Delivery in 12 Hours After Placing Order
  • Free Turnitin Report
  • Unlimited Revisions
  • Privacy Guaranteed

6 writers have sent their proposals to do this homework:

Homework Tutor
Calculation Guru
High Quality Assignments
Write My Coursework
Top Class Results
Finance Homework Help
Writer Writer Name Offer Chat
Homework Tutor

ONLINE

Homework Tutor

I have written research reports, assignments, thesis, research proposals, and dissertations for different level students and on different subjects.

$19 Chat With Writer
Calculation Guru

ONLINE

Calculation Guru

I have assisted scholars, business persons, startups, entrepreneurs, marketers, managers etc in their, pitches, presentations, market research, business plans etc.

$37 Chat With Writer
High Quality Assignments

ONLINE

High Quality Assignments

I will be delighted to work on your project. As an experienced writer, I can provide you top quality, well researched, concise and error-free work within your provided deadline at very reasonable prices.

$25 Chat With Writer
Write My Coursework

ONLINE

Write My Coursework

I have worked on wide variety of research papers including; Analytical research paper, Argumentative research paper, Interpretative research, experimental research etc.

$18 Chat With Writer
Top Class Results

ONLINE

Top Class Results

I can assist you in plagiarism free writing as I have already done several related projects of writing. I have a master qualification with 5 years’ experience in; Essay Writing, Case Study Writing, Report Writing.

$23 Chat With Writer
Finance Homework Help

ONLINE

Finance Homework Help

I will provide you with the well organized and well research papers from different primary and secondary sources will write the content that will support your points.

$48 Chat With Writer

Let our expert academic writers to help you in achieving a+ grades in your homework, assignment, quiz or exam.

Similar Homework Questions

EVALUATING ENVIRONMENTAL CHANGE - Snapshots of a daughter in law sparknotes - How many bricks in a linear meter - Data table 1: redox reaction of copper and silver nitrate - Https newconnect mheducation com flow connect html answers - E commerce presence map - Advance Phisyology (Due 2 hours) - Romeo and juliet study guide questions and answers act 2 - American society of public administration code of ethics - Urban and regional planning curtin handbook - Electrolysis of potassium iodide - Lynch company manufactures and sells a single product - Two kinds of statistics - Anova degrees of freedom numerator denominator - How is holy orders performed - Childcare essay examples - Practice management software does all of the following except - NURS6003 Week 5 Assignment - How to turn recurring decimals into fractions - Nursing information expert - Theory of games and economic behavior summary - Which of the following best describes a metal solid - Benefits of adjustable leg trestles - Opinion on biggest current challenge in United States - Apn professional development plan - Pressure force area questions - Film Response Paper - Homework - Lecture 5 notes - Guaranty bank ssb milwaukee wi - Money services business act 2011 - Enchanted forest a large campground in south carolina - Convert hz to kva - +971561686603 Abortion pills in Dubai/Abu Dhabi-mifepristone & misoprostol in DUBAI - Signs of intoxication rsa nsw - Accounting III - C-V-P Analysis and Break Even - Milestones in language and literacy - Ritz cinema port macquarie - What is an advantage of negative staining - Hamric and hanson's advanced practice nursing 6th edition apa citation - A Comprehensive Review of Majortests.com for Students - HA575 DQ10 - Term Paper and Presentation Part 2 - The kite runner themes - Blocking between roof rafters - How does the volume occupied by a cubic centimeter - Can i get my essay done online - Physics aqa gcse equations - Psychology - Diversity in early care and education honoring differences 5th edition - Bunsen burner temperature range - Native cherry tree australia - Resume - Anthony horowitz life story - Hunger games introduction ppt - Peri model in public health - NOT ESSAY neural networks and cognitive control - Ajax case study solution - Microeconomics true or false questions - Double storey semi detached house - Tanya maria barrientos se habla español - Juice plus franchise sign up - Asa 701 - Average mass of a marble in kg - Edmi atlas mk7b user manual - The most exciting event in my life essay - Vocabulary subtest wisc v - Open diverting loop colostomy cpt code - Isotopic abundance practice problems with answers - Problem Set 2 - Hcf hospital cover silver - Modelling sea-floor spreading activity - 7066 cargo rd columbus oh - Problem set(Mangerial Finance) - How to edit text in bluebeam - Mainstream media and HIV/AIDS - Hive heating and hot water wiring diagram - Beck v darling downs institute of advanced education case summary - Why you should donate blood persuasive speech outline - Maximum gradient for driveway - Policy and politics in nursing and health care - Good examples of _____ decisions are strategic decisions - Programming principle - Cfa piling method statement - Explain using examples the impact of individual perception on morale - Selectively reflective and inconsistently fair describe which level of thinking - Bus pass redcar and cleveland - Hulda clark kidney cleanse side effects - BHS380 Module 4 Discussion Post 2 - 133 moverly road south coogee - Skewness of a histogram - She even cooks me pancakes - PSY 5107 Week 4 – Assignment: Customize Potential Research Questions and Hypotheses - 06.04 the korean war - Shadow health focused exam cough - Identify examples of IaaS, Saas, and PaaS - Due 3 Oct - 4 pages - APA - 4 references - To create an ad for a product sold in drugstores that cures or alleviates a a condition! due tonight! 10PM EST - What methods of capital acquisition did honest tea employ why - How many protons and neutrons does aluminum have - Qsps dh 1 60