GithubHelp home page GithubHelp logo

hangman-v1's Introduction

Hangman V1

Table of Contents
  1. Goal
  2. Description
  3. Usage
  4. Client Oprations

Goal

The goal of this project is to get familiar with sockets programming in C.

Description

The project is about developing a networked application between a server (a bank) and a client (a bank customer). The client will communicate with the server to perform a set of operations and the server will handle all underlying transactions and communicate back to the client. The client will be able to ask the server for an account balance and withdrawing/transferring money.

Usage

To use the project follow the following steps:

  • Clone this repo
  • Make sure to set the port number to an available one on both client.c & server.c
  • Run make all
  • Start the server by running ./changeServer
  • Start the client by running ./nameChanger providing the arguments for your desired operation. e.g. ./nameChanger WITHDRAW myCD 10

Client Oprations

There are three operations that can be performed by the client.

Checking Balance

For checking an account balance, you should run the client providing the following arguments.

./nameChanger BAL [accountName]
./nameChanger BAL myChecking

Withdrawing Money

For withdrawing money from an account, you should run the client providing the following arguments (you are not allowed to withdraw more than 3 times a minute).

./nameChanger WITHDRAW [accountName] [amount]
./nameChanger WITHDRAW my401k 400

Transfering Money

For transferring money from an account to another, you should run the client providing the following arguments.

./nameChanger TRANSFER [firstAccountName] [secondAccountName] [amount]
./nameChanger TRANSFER myChecking myCD 300

Notes

  • An account name can be myChecking, mySavings, myCD, my401k, or my529.
  • An amount to be withdrawn or transferred must be an integer greater than 0.
  • Only three withdrawals are allowed per account within a minute duration.

hangman-v1's People

Contributors

ihadabs avatar

Watchers

 avatar  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.