Problem Solving And Program Design Computer Science Essay

Published:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

The objective of this assignment is to create an application to maintain a list of friends contact details using c. program is primarily meant for users to key in their names and contact details, like a phonebook. User can add, edit, delete and search contacts using part of their information. Users should be able to quite the menu and add more records whenever they wish to.

To be successful in this project, we have to make a Buddy book which is user friendly and error free as possible.

3. Project description

Our main objective is to make a buddy book which allow users to add contacts, edit them, search for a contact by a letter or name, display all contacts and remove a contact from the list..

Main menu of the program provide 5 options.

Add a friend

Modify friends' details

Display all my friends

Search friends

Exit

Adding a contact

When adding a new contact to buddy book user is promote to enter these details.

Enter First Name:

Enter Last Name:

Enter Home Number:

Enter mobile Number:

Do you wish to add more numbers to phonebook(Y/N)?

If the user selection is "Y" above procedure is repeating. If user selection is "N" user redirected to main menu.

Modifying a contact

When a user selects this option it will displays all the saved contacts in buddy book and prompt user to select a contact by contact order. After selecting the contact number to edit, program will give these options to select.

Full Contact Press 1

First Name Press 2

Last Name Press 3

Home Number Press 4

Mobile Number press 5

Go to main menu press 6

Exit press 7

Selection 1-This gives user to modify a full contact. He can modify all the fields in the contact.

Selection 2-if he selects number two he can only modify first name of the contact.

Selection 3- If he selects number three he can only modify Last name of the contact.

Selection 4- If he selects number four he can only modify Home number of the contact.

Selection 5- If he selects number five he can only modify mobile number of the contact.

Selection 6- If he selects number six he will redirect to main menu.

Selection 7- If he selects number seven program will exit.

Display all contacts

This will display the entire contacts store in buddy book. If there isn't any contacts store in buddy book, it will display

Phonebook is empty; do you want to add contacts? (Y/N)

If user selects 'Y' he will prompt to add contact menu. If he select 'N' he will prompt to main menu.

Search contacts

In search menu there are two options user can select to do a search

Search by first letter

Search by first name

Search by first letter

Users prompt to enter a character and the program will display all records with names that start with that character.

Search by first name

This will display all records starts with that entered name

Flow chart

Main menu

Add contacts menu

Modify menu

Search menu

5. Pseudo code

BEGIN

read choice

Case choice

case 1 : Add friends

case 2 : Modify friends details

case 3 : Display all my friends

case 4 : Search friends

case 5 : Exit

default: display "Invalid selection"

End case

read count=0

If(choice==1)

If(count==10)

display "You have exceeded the buddy book capacity"

Else

display "Enter the first name"

read firstName

display "Enter the last name"

read lastName

display "Enter the home number"

read homeNum

display "Enter the mobile number"

read mobileNum

count=count+1

display "Data successfully saved!!!"

display "Do you wish to add more numbers(Y/N)?"

read respond

If(respond=='Y')

return to case 1

Else

return to main menu

End if

End if

Else if(choice==2)

display "Phone book contact list"

i=0

while(i<=count)

display firstName

display lastName

display homeNum

display mobileNum

i++

End while

display "Enter the number of the contact that you want to modify"

read respond

If(respond>count) or (respond<0)

display "You have entered an invalid number. Check and enter the correct number"

Else

display "If you want to modify:"

display "Full contact Press1"

display "First name Press2"

display "Last name Press3"

display "Home number Press4"

display "Mobile number Press5"

display "Enter your choice"

read respond

If(respond==1)

display "contact you want to modify is:"

display firstName

display lastName

display homeNum

display mobileNum

display "Now enter your new data"

display "Enter new first name"

read firstName

display "Enter new last name"

read lastName

display "Enter new home number"

read homeNum

display "Enter new mobile number"

read mobileNum

display "Data successfully saved!!!"

display "Do you want to modify an another contact(Y/N)?"

read answer

If(answer=='Y')

return to case 2

Else

return to main menu

End if

End if

Else if(respond==2)

display "contact you want to modify is:"

display firstName

display lastName

display homeNum

display mobileNum

display "Now enter your new data"

display "Enter new first name"

read firstName

display "Data successfully saved!!!"

display "Do you want to modify an another contact(Y/N)?"

read answer

If(answer=='Y')

return to case 2

Else

return to main menu

End if

Else if(respond==3)

display "contact you want to modify is:"

display firstName

display lastName

display homeNum

display mobileNum

display "Now enter your new data"

display "Enter new last name"

read lastName

display "Data successfully saved!!!"

display "Do you want to modify an another contact(Y/N)?"

read answer

If(answer=='Y')

return to case 2

Else

return to main menu

End if

Else if(respond==4)

display "contact you want to modify is:"

display firstName

display lastName

display homeNum

display mobileNum

display "Now enter your new data"

display "Enter new home number"

read homeNum

display "Data successfully saved!!!"

display "Do you want to modify an another contact(Y/N)?"

read answer

If(answer=='Y')

return to case 2

Else

return to main menu

End if

Else if(respond==5)

display "contact you want to modify is:"

display firstName

display lastName

display homeNum

display mobileNum

display "Now enter your new data"

display "Enter new mobile number"

read mobileNum

display "Data successfully saved!!!"

display "Do you want to modify an another contact(Y/N)?"

read answer

If(answer=='Y')

return to case 2

Else

return to main menu

End if

Else

display "Invalid code"

End if

Else if(choice==3)

display "Phone book contact list"

i=0

while(i<=count)

display firstName

display lastName

display homeNum

display mobileNum

i++

End while

Else if(choice==4)

read first_char

read first_name

display "Search"

display "If you want to search by:"

display "first letter Press1"

display "first name Press2"

display "Enter your selection"

read selection

If(selection<0) or (selection>2)

display "Invalid code"

Else if(selection==1)

display "search by first letter of the name"

display "Enter first letter to search"

read first_letter

i=0

while(i<=count)

i++

If(first_letter==first_char)

display firstName

display lastName

display homeNum

display mobileNum

Else

display "No matches found"

End if

End while

Else

display "search by first name"

display "Enter first name to search"

read first_name

i=0

while(i<=count)

i++

If(first_name==firstName)

display firstName

display lastName

display homeNum

display mobileNum

Else

display "No matches found"

End if

End while

End if

Else if(choice==5)

display "Are you sure that you want to exit(Y/N)?"

read answer

If(answer=='Y')

abort

Else

return to main menu

End if

Else

display "Invalid selection"

display "Check the menu and enter your choice again"

End if

END

6.User Guide

Start menu

This is the main screen of the buddy book. Press any key to go to main menu.

Main menu

You can select what you want to do by pressing a number

Add contact

In add new contact menu you can enter a new contact by first name, last name, home number and Mobile number

When all contact details are entered the following message will appear. If you select 'y' you can add more contacts.

Modify contacts

Here you should enter the number of the contact which you want to modify.

This display the contact you want to modify. Press 'y' to go to the modifying menu.

In this menu you can enter what part of the contact you want to modify.

If you select 1 in previous menu this menu appears and user prompt to add new details for selected contact.

Once all the details are entered and press enter key, this menu appears .If you want to modify another contact press 'y'.It will redirect to modify menu. If you want to go to the main menu press any key except 'y'.

Display all contacts

Here you can see all the contacts details you entered.

Contact search menu

Here you can select search options. You can search a contact by first letter of the contact and first name of the contact.

Enter the first letter of the contact and press enter. It will display all the contacts start with that letter.

Enter the first name of the contact which you want to search and then press enter. It will display all the contacts which have that first name.

Exit

If you select exit option in any menu this program aborted window is displays. If you select ok buddy book will exit.

7.Limitations

Here we are going to say some things about the limitations in the program that we developed.

In this program we had to limit the number of contacts to 6 .An attempt to add more contacts would give an error message.

We applied some limitations when entering data. In the case of number of characters also we had to limit the amount. For the home number and office number fields only integers can be applied and limit that to 15 integers in each field.

Here we can search a contact only by first letter and first name. we can't search a contact by last name or a contact number.

In this phonebook we can't add a middle name of a person to the phone book.

In our buddy book only add two numbers for a person. If person have more than two numbers there aren't any way to add all numbers into a one contact.

8. FURTHER Development

There are some limitations in the program that we have developed. One limitation is the amount of contacts that we included in the program. In a future development we hope to increase the amount of contacts.

In the program that we developed there are a few fields such as first name ,Last name, home number, mobile number etc .In future we would like to increase these by including fields like e-mail address and home address of a contact .

Further we hope to introduce more methods of searching contacts in a future development. There are limitations in the computer language we used. If we are to use a computer language with graphical user interface, we would be able to introduce much more interactive computer program. Therefore in future we would like to use a language with GUI.

If we use programming languages which support GUI, we can put an option to add a real photo of a user to his contact details.

Also we can add a data saving option to the buddy book. So users can store contacts and can use it in future.

We can add a data sorting option to this program. So when a user search something results automatically sorted and display to user. So it becomes more user-friendly.

9. Conclusion

It is a great pleasure for us to having got an opportunity to express some of our ideas at successful conclusion of this project. This project gave us an opportunity to put into practice some of the lessons that we were taught theoretically at the lecture room. We obtained a vast knowledge when we engaged practically in this project. We put into practice the units Functions, Flow charts, Arrays, Structures, Pseudo codes .These are very important lessons for us In C Language.

This project gave us an opportunity to work as a team to achieve a common goal. With that we learnt how to work as a team with a team sprit to accomplish a common goal.

Writing Services

Essay Writing
Service

Find out how the very best essay writing service can help you accomplish more and achieve higher marks today.

Assignment Writing Service

From complicated assignments to tricky tasks, our experts can tackle virtually any question thrown at them.

Dissertation Writing Service

A dissertation (also known as a thesis or research project) is probably the most important piece of work for any student! From full dissertations to individual chapters, we’re on hand to support you.

Coursework Writing Service

Our expert qualified writers can help you get your coursework right first time, every time.

Dissertation Proposal Service

The first step to completing a dissertation is to create a proposal that talks about what you wish to do. Our experts can design suitable methodologies - perfect to help you get started with a dissertation.

Report Writing
Service

Reports for any audience. Perfectly structured, professionally written, and tailored to suit your exact requirements.

Essay Skeleton Answer Service

If you’re just looking for some help to get started on an essay, our outline service provides you with a perfect essay plan.

Marking & Proofreading Service

Not sure if your work is hitting the mark? Struggling to get feedback from your lecturer? Our premium marking service was created just for you - get the feedback you deserve now.

Exam Revision
Service

Exams can be one of the most stressful experiences you’ll ever have! Revision is key, and we’re here to help. With custom created revision notes and exam answers, you’ll never feel underprepared again.