Giter VIP home page Giter VIP logo

assignment-1-shishankjain's Introduction

GLA University, 2020

Contact Lists

Create a menu-driven program to emulate a Contact Lists Application. You might see such apps in smartphones, you are free to go ahead and take ideas from your own contact applications.

Your menu-driven program must look like:

Welcome to DBC's Contact List App
Press 1 to add a new contact
Press 2 to view all contacts
Press 3 to search for a contact
Press 4 to delete a contact
Press 5 to exit program 

The 'Add a new contact menu'

You have chosen to add a new contact: 
Please enter the name of the Person
First Name: Divyansh
Last Name: Bhardwaj
Contact Number: 1234567891
Would you like to add another contact number? (y/n): y
Contact Number: 2365987415
Would you like to add another contact number? (y/n): n
Would you like to add email address? (y/n): y
Email Address: [email protected]

Information about the 'add a contact menu'

  1. This program will store this Person as a type (you have to create a Person class). That means this program uses a list of Persons.
public class Person {
    // a field to store the first name
    // a field to store the last name
    // a list to store multiple contact numbers (i.e a list of numbers)
    // a field to store the email address of the person 
}

The view all contacts menu

---Here are all your contacts---
-------- * -------- * -------- * --------
First Name: Jim
Last Name: Carrey
Contact Number(s): 1547852369, 1452879632
Email address: [email protected]
-------- * -------- * -------- * --------
-------- * -------- * -------- * --------
First Name: Robin
Last Name: Williams
Contact Number: 7845985632
Email address: [email protected]
-------- * -------- * -------- * --------

Information about the view all contacts menu

  1. No matter how the user adds the contacts in the list, they should always be alphabetically ordered on the basis of the first name.
  2. If the Person has only one contact number, then the contact card should show the number field as Number only. If the Person has multiple contacts, then it should show Number(s).

The search for a contact menu

You could search for a contact from their first names: 
Jim
1 match found!
-------- * -------- * -------- * --------
First Name: Jim
Last Name: Carrey
Contact Number(s): 1547852369, 1452879632
Email address: [email protected]
-------- * -------- * -------- * --------

Information about the above menu

  1. There can be multiple Person objects with the same name, in such a case, show all the matches.
  2. If nothing is found, print NO RESULTS FOUND!

The delete a contact menu

Here are all your contacts: 
1. Jim Carrey
2. Robin Williams
Press the number against the contact to delete it: 1
Jim Carrey's contact deleted from list!

Kindly DO NOT create the program in a single Main class. Try out some Object-Oriented Programming and use your skills from your software engineering classes as well.

Steps to attempt this assignment:

  1. Fork this repository.
  2. Clone the repository you forked to your computer.
  3. Write code and commit it.
  4. Push the code back to your fork.

Please feel free to reach out to me in case of any queries.

assignment-1-shishankjain's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.