Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone help me with this C program please? I've been trying and I've only gotten the struct working but not the rest. The Problem

Can someone help me with this C program please? I've been trying and I've only gotten the struct working but not the rest.

The Problem

You are to produce an interface that reads a file called myContactsList.db and display it and allow for several actions.

You must use the following structure:

struct contact {

unsigned long phone_number; long first_name_posn;

long last_name_posn;

long company_name_posn; long email_posn;

long next;

};

*Important

This structure will be written to file. It will hold the phone number and the positions for first, last, company and email. After writing the structure to file you will then write the first name, last name, company name, and email to file. You will keep repeating this for as many times as the user wishes to input information. You should be able to scan the file for contacts based on the phone number.

- You must enter either a Last Name or a Company Name for each contact (as well as the phone number and email).

- You must check that the phone number has either 7 or 10 digits.

- The email address must have the following format: string@string.ccc

Your interface will allow the following to be done:

List all contacts in alphabetical (ascending) order by name (either last name or company name) only displaying the name. Only 5 names will be displayed at a time. You can tell the interface to scroll down or up one name at a time.

Add a new contact.

Allow one of the contacts to be selected (by the number beside it on the display).

Display the full information for the selected contact.

Change the phone number or email for a selected contact.

Delete a selected contact.

Return to the full contacts list.

Exit the program (all changes to the myContactsList.db file must be written to disk).

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

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

=+ What are the information and consultation requirements?

Answered: 1 week ago