Simulate a ATM (cash machine) on UNIX(Putty) using scritps

 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions Simulate a ATM (cash machine) on UNIX(Putty) using scritps
# 1  
Old 10-07-2010
Simulate a ATM (cash machine) on UNIX(Putty) using scritps

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:
I need to create a simple ATM (Cash machine simulation in unix) which shows a welcome screen, then a login screen to enter 3 users details. help please on the coding

The users details need to be in a txt file: the details are: (PIN No, First name last name, Account number, Balance, Histrosy)

PIN001, Dale Cooper, 111, 1000, History
PIN002, Paul Atreides, 222, 2000, History
PIN003, Ray Manzarek, 333, 3000, History

I Understand this can be written in a script. If so, if anyone can help with creating a script that shows "Welcome to ATM Machine", What is your name? (the user would then input their name to log on. Then enter there pin number which is attached to the file to show their balance. It may seem very simple to create but I urgently need help.

I am using Putty on a Windows machine.


2. Relevant commands, code, scripts, algorithms:
In Putty, I have created the simple directory. But thats it


3. The attempts at a solution (include all code and scripts):
Attempted to write a script, but unsecessful in vi editor


4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

Middlesex University, London, Dr Mark Smythe, Course PDE3020 Coding and Practise.

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
# 2  
Old 10-08-2010
This is a simple problem.

You simply use a shell script that runs and asks for a userid and pin number. Then, it asks how much they want to withdraw, checks balance, subtracts from balance, displays balance etc.

It is basically quite simple. Just start with a simple program to input a value from the shell, asking the user for input, and go from there.
# 3  
Old 10-08-2010
Then try in pseudocode to write an algorithm which
1) check if the user can withdraw the wanted amount (using balance...)
2) the proper algorithm of the money to give (highest note first etc...)
e.g no 50£ in the box -> give back in 20£ if not in 10£ etc.. you get the idea of the appointed task now

Good luck
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use shell command on Perl scritps?

On our OS I don't have Perl df command. How can I use shell commands from Perl scripts? (6 Replies)
Discussion started by: digioleg54
6 Replies

2. Ubuntu

Login from putty in wndows7 to connect ubuntu machine

hi, i have ubuntu installed on windows 7. I am trying to connecting to ubuntu from windows 7 using putty but it is giving network problem. I am trying to connect with ip address Thanks (9 Replies)
Discussion started by: diehard
9 Replies

3. Shell Programming and Scripting

How to transfer files from unix machine to local machine using shell script?

Hi All.. Am new to Unix!! Am creating a shell script in which a scenario is like i have transfer the output file from unix machine (Server) to local directory (Windows xp). And also i have to transfer the input file from the local directory to Unix machine (Server) Any help from you... (1 Reply)
Discussion started by: vidhyaS
1 Replies

4. Programming

Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX

Writing a Tool to simulate non-sequential disk I/O (simulate db file sequential read) in C POSIX I have over the years come across the same issue a couple of times, and it normally is that the read speed on SAN is absolutely atrocious when doing non-sequential I/O to the disks. Problem being of... (7 Replies)
Discussion started by: vrghost
7 Replies

5. UNIX for Dummies Questions & Answers

Create a simple ATM (Cash machine simulation)

I need to create a simple ATM (Cash machine simulation in unix) which shows a welcome screen, then a login screen to enter 3 users details. help please on the coding The users details need to be in a txt file: the details are: (PIN No, First name last name, Account number, Balance, Histrosy) ... (1 Reply)
Discussion started by: oobla01
1 Replies

6. UNIX for Advanced & Expert Users

Change the putty code to get machine and user name from a file

HI, I have parsed a file and stored all my machine name and user name in a list. Now I want to change in the putty code such that the machine name and user name can be passed through calling that one by one from tht list through an object. Then pass it to the place the putty takes user name... (7 Replies)
Discussion started by: madfox
7 Replies

7. Shell Programming and Scripting

PUTTY via UNIX script

HELP!!!! I want to execute a PUTTY telnet connection via UNIX script??? Any help please?? Thanks (1 Reply)
Discussion started by: tontal
1 Replies

8. Shell Programming and Scripting

XML parsing through shell scritps

Hi, Am new to scripting. :) Am trying to figure out whether can i use bash scripting to parse an xml file. Parsing is not just pulling out information according to the pattern but its more of a generic parsing. I should identify the xml hierarchy and pull out information accordingly. It's not a... (2 Replies)
Discussion started by: karthikvela
2 Replies

9. UNIX for Dummies Questions & Answers

Newbie: Simulate unix on my pc

Hi, i am new with unix. Just came back from a course, unix basics for aix. So for me to practice, i want to install a simulation program for unix om my Windows Xp pc. Dual boot must it be. Does anybody have a suggestion for this dummy??? Thnx! Paul (5 Replies)
Discussion started by: welbp00
5 Replies

10. IP Networking

How can i simulate network problems between unix machines ?

Hello all i need to simulate method invocations between 2 machine ( using corba ) now i like to test the method invoke timeout from machine1 to machine2 for that i need to simulate network being busy , can it be done some how ? (2 Replies)
Discussion started by: umen
2 Replies
Login or Register to Ask a Question