Code Monkey home page Code Monkey logo

contact-cli-refactor's Introduction

Contact Command Line Interface (CLI)

Command Line Interface to manage a contact list

Assignment Objectives:

  • Show all your contacts
  • Add a new contact
  • Search a contact by their name
  • Delete an existing contact
  • Keep data inside a contacts.txt

Bonus...

  • Format the phone numbers using dashes
  • Allow formatting phone numbers with different lengths
  • Warn user when entering duplicate contact... provide a (Y/N) response
  • Keep columns equally spaced
  • Add or trim spaces as needed
  • Include email

Bonus +++

  • Email verification check: 1 @ and ".com", ".edu", or ".mil"
  • Allow contact modifications
  • [] Add Sort and run it alphabetize contact.txt by last name

Current App Status in Action:

Assignment Recommendations:

  • The text file should contain one contact per line
  • When the application starts, the contact list should be read from the file.
  • Before the application exits, the contacts file should be rewritten.

App structure

  1. Contact Text: key, name (first & last), phone, email

  2. Contact class:
    Fields: (key, fName, lName, phone, email)
    Methods: (set, get)
    Description: At the moment, we do not need contact objects. This could be used later if the scope of the project demands it.

  3. ContactManager class:
    Fields: (filename, directory, fileData, directoryPath, filePath)
    Methods: (create, read, update, delete, saveFile)
    Description: Manages CRUD data between application and data file

  4. ContactPrograms:
    Fields: (ContactManger[inst], Input[inst])
    Methods: (readAll, findContact, checkContact, modContact; sortContacts; deleteContact)
    Description: Combines cm crud functions into larger programs the user selects within the ca menus

  5. ContactApplication:
    Fields: (FIELDS)
    Methods: (readAll, findContact, checkContact, modContact; sortContacts; deleteContact)
    Description: Provides user with menus, calls program according to user selection, includes overall application run and terminate function

  6. UI: Input:
    Fields: (FIELDS)
    Methods: (getString, getPhone, getEmail, checkName, checkPhone, checkEmail)
    Description: Manages user inputs, checks for errors

contact-cli-refactor's People

Contributors

webdevjasoncameron avatar dennisecamacho avatar

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.