Download as pdf
Download as pdf
You are on page 1of 38
Po "Please Tick”) for f Redo Assignme } APU Foundation & Degree = | Programmes: = L es n and Feedback Form Coursework Si RABIN ACHARYA Name of Group Members (FA pplicabtey | [Student No NPTUNOOSS Tntaker[ NPUTFTDOOTT Modhte Code & Tie | CTOTS-31 TFC Assignment Title |ALASYIAN URBAN BANK MANAGEMENT SYSTEM (MUBMS) MR. SUSHIL ADHIKART - Student E-Mail: Rabin7acharya@gmail.com ‘have read and understood the regutations on Plagiarism and Academic Dishonesty and declare that the work submited does not oe ‘Name of Lecturer Date Due ‘breach those regulations Signed: ‘You must hand in to the designated APU Administrator — ensure that you receive your receipt. [Received By_] [Signature Date | Time | ] Criteria wi ait [Margi | pass | creat] Distinction * Deakgn Sancti (ab 4 6 4 a 93(44 Flodka cw) — lac [a5 + Decuman tation (2) } 16 2 Hy A 4 ae Demonstrrbin (44) + 9 14 la quan J Awwey(a))-4 men Additional Comments: (These may be listed beldw of affached) oe ne desig 5 = Phwcherty cop tem ef faike roipaices sf sift a coding ir lis good: ane po necely ex * &, 1% % aa h fay [ocky 50.8 betta de nepneclergemen sheild i fpowd) eae "45 nites oa ‘n ag BSE CINE rss denn a re Grade Dae Tas ee Taking account of above Fact over provisional asessnentofyourworkis: [ A-4'] [4 Yferfeery hp A =a Dison Cre Fas ‘At: 80-10% | A:75-79% | BH 70-74% | BrG500% Ce: 60-64% TC: 55-59% [C2 50-54% ‘Margial Fal Fall D: 40-49% FH 30-39% F: 20-29% L Fi: 0-19% The comments and assessment result are subject to both internal and external m Consequently, they may not reflect your fina grade. You may not appeal agains ioderation at the appropriate Examination Board. ‘these result on ground of Academic Judgement. Scanned with CamScanner | BEEP gaggaguaBEEBE WEB E TE Ww eters eran ASSIGNMENT INFOMAX COLLEGE OF IT AND MANAGEMENT cT018-3-1 INTRODUCTION TO C PROGRAMMING HAND OUT DATE: 11/0CT/2019 a HAND IN DATE: 23/DEC/2019 WEIGHTAGE: 80% INSTRUCTIONS TO CANDIDATES: . Submit your assignment at the administrative counter. . Students are advised to ras answers with the use of references (cited using the Harvard Name System of Kéferencing) . Late submissions will be awarded zero(0) unless Extenuating Circumstances are upheld. . Cases of plagiarism will be penalized. The assignment should be bound in appropriate style (comb bound or stapled) . Where the assignment should be submitted in hardcopy and softcopy, the softcopy of the written assignment and source code (where appropriate) should be on a CD in an envelope / CD cover and attached to the hard copy. 7 You must obtain 50% overall to pass this module. Scanned with CamScanner \ i | 1% Ox 5% INTERNET SOURCES — PUBLICATIONS STUDENT PAPERS Submitted to Asia Pacific University College of 1 9% Technology and Innovation (UCT) : ‘Student Paper Submitted to Aspen University Student Paper : 1 % Submitted to Punjab Technical University 1 : ‘Student Paper %o Submitted to RDI Distance Learnin Student Paper : 1 % home.hit.no Interet Source <1 % BH Submitted to University of Northumbria at <1 = % Newcastle - Student Paper — Submitfed to Southern New Hampshire <1 . University - Continuing Education 7 ‘Student Paper o GANG QU, NAOYUKI KAWABE, KIMIYOSHI 1 <1% USAMI, MIODRAG POTKONJAK. "CODE. ae: Scanned with CamScanner Abstraction MUBMS (Malaysian Urban Bank Management System) which is @ The study is based on the amming. The main purpose of this bank management system el on C-Progr and fast features to provide a rer chart and pseudocode. It was a great experience designin Using the function has helped to console framework wanking experience. ‘This g the istic is to simulate users with simple report is conecived with the flow application with the use of different C-Programming concepts. nnetions while coding, Similarly, used in the project. break the tasks into different fi structure, array, pointer, variables and iterative constructs are the main ¢ programr Acknowledgement This projectreport was generated with god for gracing my life with blessing an Je teacher Sushil Adhikari sir for providing continuous y special thanks to our college Infomax College of 1 alot of help and suppor. First of all, ! would like to thank \d opportunities. guidance 1 would like to thank our modul T and and help. 1 would like to offer m; Management and Asia Pacific Universit thank you all for your direct and indirect hel y. Iwas helped by my colleges and other close friends. So, iping hands. Scanned with CamScanner Contents 1 2 2 3 3a. Library fun 3.2, User defined functions.. 4. C programming concepts... 44, Funetions... 42. 43. 44, 44. 5. 6 & 9. a 2 2d 2 2 22 45. Decision-makin; 46. 4g. pttons Introduction and Asst Project Design Main Menu. 2. Login: 3. Admin Menu. 4. Customer Ment ID Auto generation. 6. Deposit i draw .. Funetions Used. 4.4.2. While Loop .. Additional features . Sample Output... Conclusion. 35 References... 35 Scanned with CamScanner ptions aac 1. Introduction and Aj ; a hank Management System which it This report is based on the an Urban Programming based consote application. The wal se of this bank management system is to aera te provide at realistic funetionality in MUBMS and use the application like real + records, perform transactions, ication has funetionality to keep Use a ww are the types of users who can use the MUBMS, banking, This console add/remove users and so on. BETO a, Admin ‘Adin isthe main user of the bank application having authority 19 see user records, manage them according to requirement. b, Customer console application isto serve customers. So, customers are are allowed to create an MUBMS account, update the saved information. The main purpose of creating, the also an integral part of this application. They perform transactional activities, sce their information, ‘The app was designed for efficient and reliable banking experience f0 users. When a user signup into the system, they ae provided with a unique ID number and acceurt number. The system distinguishes each user according to their unique ID number. An ‘admin can view all the user’s confidential data including username and password. The system is assumed and designed in such way that a customer cannot withdraw amount more than available balance in their nocount, Similarly, the customer cannot deposit more than $1000000.00 per one transaction. ich helps customers for saving time, reducing travel The application is lite and easy to use whi form mobile banking experience and offer service cost. The system is designed for users to pe .e, anywhere. ae y Scanned with CamScanner 2. Project Design The mini project is often designed using pseudocode and flowchart for coding. The pseudocode is the line by line description ofa program whereas, flowchart is the pictorial representation of pseudocode and algorithm, The pseudocode and flowchart below show the in-depth design of the entire program, 2. Main Menu Pseudocode: Start the program. Display Main Menu of the Bank application. Input choice. Switch the choice entered. If choice == I, then go to Login menu, Ifchoice == 2, then go to Signup menu, If choice == 3, then exit the program, Else print “Invalid Input, please enter [1-3]", Return to step 3, End the If statement, 6. End the function, 1 2. 4, Scanned with CamScanner Flowchart | ain) y ‘mainmenu() loging) signup) érint “invalid input please enter [1-3]¥ Scanned with CamScanner 2.2. Login Pseudocode: ae eeEe Start the program, Input user list} id, count, Open wser.txt in read mode, Display Login Menu, Input user name and password, Ifusername and password match with data in user. Ifrole in user.txt == "a", Go to adminmenu() function, Else, Return id, Close user.txt, Else, Print “Login failed, press any key to return”, Go to step 4, End the if statement, End the function. oa Scanned with CamScanner .=S SS Flowchart: faput userlist}, I, count lopen usertxt in read mode} Aisplay Login menu, username and Print "Login failed press any key to returt Scanned with CamScanner sas aS OS jin Menu Pseudocode: Start the program, Input user fist], count, id, Display Admin Ment, eweustomerlist() function, 6 Go to managecustomers() function, 7. Ichoice Open deluser.txt in read mode, Display removed user list, Close deluser.txt, 8. Ifchoice End the function, 9. Else, Print “Invalid choice, please enter {l-4], Go to step 1, 10. End the if statement, 11. End the program. Scanned with CamScanner Flowchart: lopen usertst In read mode| please enter {1 caeranwenst | Grates) managecustomers{) in read mode | [eres close delusertat Scanned with CamScanner 2.4. Customer Menu Pseudocod: 1. Start the program, 2. Input user list{], count, 3. Display Customer Menu, 4. 5 Input choice, If choice Go to deposit() function, 6. If choic , Go to withdraw() function, 7. Ifchoice == 3, Go to myinfo() function, 8. Ifch 4, Go to viewtranhistory() function, 9. Ifchoice Go to editmyinfo() function, 10. If choice == 6, Exit the function, 11. Else, Print “Invalid choice, please enter [1-6], Go to step 1, 12, End the if statement, 13, End the program. ao Scanned with CamScanner Flowchart: Cm Lomemmet /- tat n ead mode] Jopen user: deposit) withdraw) ryintot) viowtranhistory) co print “invalld choice, please enter [1-6] Scanned with CamScanner 12 2.5. ID Auto generation Pseudocode: I. Start the function, 2. Initialize id = 0, 3. Open user.txt in read mode, 4. If newmaxuserid< id, Newmaxuserid = id 5. Close transaction.txt 6. Return newmaxuserid+1 7. End the function Scanned with CamScanner Flowchart: lopen user.txt in read mode| 13 Scanned with CamScanner 14 2.6. Deposit Pseudocode: 1. Start, 2, Input user list{], count, id, 3. Open transaction.txt in append mode, 4, Display Deposit Menu, 5, Input addamount to deposit, 6. Iftmp.id = id, Tmp.balance Write transaction into file, 7. Call writetmpintofile0 function, Print “addamount has been deposited” 9, End the function. mp.balance + addbalance Scanned with CamScanner Flowchart: Open transaction.txt in read mode ° For iccount = ‘tmp.balance= tmp.balance + addbalance close FILE transaction.txt WRITE in transaction.txt End the function Scanned with CamScanner 16 2.7, Withdraw Pseudocode: 1. Start, 2. Input user list{], count, id, 3. Open transaction.txt in append mode, 4. Display Withdraw Menu, 5. Input witamount to withdraw, 6. Start for loop, Tmp =list{i], Iftmp.id == id, If tmp.balance 4 Input user list{], count, Id 7 Y. ‘Open transaction.xt In read mode Display Withdraw Menu t= For I Used for creating a console platform screen 3 ~ ised for input and output operations (printf and scanf), 4 [ U ray manipulation, __| 5 ised for accessing system date in the program. 6 | ddefine ENTER 13 _| Used for password hide, (ch==\0) KR 3.2, User defined functions i, mainmenu() Itis the outer menu which consists functions like login, signup and exit. i. login This function allows users to log in with their username and password which they get form signing up in the application. After entering username and password they redirected to either admin menu or customer menu according to their user account type. wee x a uo iii, signup. - This function enables tsers to create an MUMBS account as a customer. After completing signup process, the users are allowed to login with their newly created account. iv, adminmenu() The admin menu function is comprised with functions like viewuserlist(), manageusers(). - _- a 18 Scanned with CamScanner Vv. viewcustomerlist() This function allows admin to see all the user account created in the MUMBS including admins and customers, Vi. managecustomers() . removeuser() and makeadmin(). 's of to major fun This function consi vii. removeuser() Admin can remove the existing MUMBS accounts through this function. viii. _ makeadmin() ‘Admin can assign admin role to othef user accounts. © WV : ix, customermenu() In this function the customers can perform transactional activities like deposit withdraw from their respective account number. Moreover, they can edit their personal data, see their transaction history. _ a x. defo) Customer can deposit certain amount of money according to their desire and need. xi. withdraw() This function allows customer to withdraw amount which they deposited earlier in the MUMBS application. xii. myinfoQ ‘Through this function customer can see their personal details like name, address, account number, user ID, date of birth, phone number, existing balance which they provided earlier during signup. —_— 19 Scanned with CamScanner -wtranhistory() The customers can see all the transaction log associated with their account number since they created the bank account. xiv. editmyinfo() Customers can edit and save their previously stored information like name, address, phone number, username and password through this function. 20 Scanned with CamScanner 4.C Programming concepts C programming language is one of the powerfull and general-purpose programming languages. It is simple, flexible, structured programming language due to which it is popular and widely used, A program is divided into various modules which is suitable for testing, maintaining and debugging. There are lots of ¢ programming concepts available for compiling a source code. erative funetions, multiple conditional statements, data structures are the most common concepts in ¢ programming language. Below are the concepts used while writing the code for MUBMS. 4.1. Functions In ¢ programming language, functions are of two types icc. library functions and user defined functions. Here in this report, both library and user defined functions are used. The use of these function has served this project in many ways. Using funetion, it was easy to assign particular task to a particular function. It made debugging easier. Similarly, problem plotting was effective and efficient. Below are the functions used in the source code of MUBMS application, Function sample: void saineenu() { int choice, count; struct user List(s ‘count » losdaccountlistfronfile(Jist)s systee("els")s prine#(“\n\ehe Print#("\n\n\ti. Login"); Printf(*\n\t2. Signup (For Custowers)")s Printf(“An\t3. Exit"); Printf("\n\n\tiich operation to perfors?\n\t"); scanf("Kd", choice); fFlush(stdin)s switeh(choice) e { SF getch()s breaks case 1: custonermenu(list, cou 2 Signal re care 3: syater(cals)y oe Senet Cwsnt Tank You for using our apl\n\thress any key to Exit\n")s retary Beaks default: systes Els"); } Lo 2a Scanned with CamScanner 4.2. Structure A structure is a user defined data type wh Single structure. To create a structure a keywo is the example of structure named user consis h may consist a group of different data types into a rd ‘struct’ is used before the structure name. Below ifferent data types. le names different van Sample structure: struct user { int id; Long int acc_nun, phone} float balanc char acc_type, nane(50), address[50], gender[6], usernane[20], password{20], role; 4, HTM de as Array is a data structure that consists a group of elements. It is a collection of one or more value . storing user list, array of of the same type. In this project, array is used for mainly two purpose character. Sample array: Struct user list{J; char name{100], username[20], password[20], repassword[20], address[50], gender[6]; es 22 Scanned with CamScanner 4.4. Loops A loop is sequence of instruction that repeats until a spec Question is asked again until no further action System application different loops are used like for loop, while loop. fied condition is reached. The same sired, In the bank management re 4.4.1. For loop Sample For Loop: void removeuser(struct user List[], dnt count) { ine td, 4; Print#("Xd", count); Printé("Enter an ID to remove: scanf("xd", 814); for (0; iccounts i++) { Sf (id == List[i] id) ¢ for (isitt; Account; i++) { Aist{i-2] = 1ist[s]; weitetmpintofile(list, count); + In the above function removeuser(); for loop is used for multiple time iteration. The loop iterates until the count I becomes equal to count. — 23 Scanned with CamScanner 4.4.2. While Loop Sample While loop: while(1) { hidesgetch()5 Sf (hide==ENTER) plilshide; printe("*")5 } ists , Le the user presses the enter button. The aim In the above program the iterates infinite times unless until ‘enter’ button is pressed. of this program is to hide the input characters with ‘*” Lo 24 Scanned with CamScanner ecision-making, aking statements in programming language decides the direction of flow of switch statements are used in this project to make some am execution. If-else statem jons according to the reuirements Sample- If-else statement if(strcmp(un, usern) == 0 && strcmp(p, pw) { //user type verification if(role=s'a') { adminmenu(list, count, id); ue return -1; } else { return id; + fclose(fp); return } In the above if statement, ; condition satisfies, then adminmenu() function is called a character type role variable is compared with character ‘a’. If the otherwise it returns id. ae Scanned with CamScanner 4.6. File handling File handling is the respective data file. T red, written and named *user.txt” of birth and another tat file nm activi process to create a data file, write data into the ereated fite and read data from Fs project uses file handling, as saving data into a bet file and the data is 12 to the requirement, There are three txt file in this project formation like name, address, account number, balance, date Ted transaction.txt? stores all the user performed transactional es like deposit, withdraw with the date. Similarly, ‘delusertxt’ stores the user data of verwritten accord or storing the us removed users from the system by an admin. Sample File Handling veld wettetmintorttecatrece user 14st], Ant count) i 4.7. Pointer he address of another variable. EI ated ann. ent, °) fer cies eco mo 14etC1); TIeatatCESCMd ane na an ae a 4 Kd kd He tad 2F HeQn"y enon td tm. 26erny Freese anidattncnens tpedobsyeery trpvadiress, tnp.phone, tmpbelance, taPor0]8)s > Fetosec tens — In this project, file pointer A pointer is a variable whose value is is used to handle the data structure form the txt file. Sample pointer FILE *fp3 fp = fopen(“user.txt", "“r")5 26 Scanned with CamScanner mum requirement of the assignment, it more realistic and efficient ion are listed below: 5. Additional features Though this console-based application is based on the n have been used in the system to make the MUBMS app! iden Password = ‘The user input password in the application is hidden using ‘*” symbol. This process is used in login and signup function. Auto-syne Removed User Information ‘After an admin removes a particular user from the bank system, the removed user's and the data can be viewed by the information is saved in a text file named ‘deluser.txt? admin. iii, Clean and User-Friendly UI the User Interface is clean, visually Though the application does not contain any graphics, pleasing and friendly to all sorts of users. 27 Scanned with CamScanner 'g C-programming language and it is a console-based application, inctionality, Some of the limitations of the MUBMS are C ameay OK ety 6. System Limitatio The MUBMS is compiled u so the application lacks security and fu listed below: ~ \ /Poor Data Validation Data vatidation is missing in the application and due to which the program can face many id input is given from the user. ( d<} e n get corrupted if the invali y aor ye Ww ious troubles, The file data lance/fund transfer facility, there is formation is collected Limited functionality ded in the MUMBS The application lacks many must have functions like bal no interest available for deposited amount. Similarly, only few user inf form the user. Information like mail address, postal code is not incluc application. ; ue iii, Low Data Security The system lacks database protection. All the user information including username and The file containing user information can password are saved using file handling method. be easily modified and deleted. Scanned with CamScanner 7. Sample Output The figures below are the sereenshots taken as sample output of the MUBMS application pee) PMS CU eC ms UL) EMaactd Which operation to perform? Figure 1: Main Menu Sample output In the above figure, it is shown the main menu of MUBMS. There are 3 options available for user for Login, Signup and Exit the program. ; A 29 Scanned with CamScanner Name [First,Last]: CSUR Try sd Corey Co Coe i Gender [Male/Female]: male Pee cnc his eee Address [Street,City,Province,Country]: Pokhara,Kaski COL) igure 2: Signup Menu Sample output n as asked in the figure above. After completing In the Signup menu user has to enter the information this process, now the user can login with their newly created MUBMS account. Se ** LOGIN MENU ** Username: user rela Figure 3: Login Menu Sample output ‘The above figure shows a user is asked to enter their login username and password which they get from signing up. After entering the correct username and password, the user can proceed to use the different functionality available ahead. 30 Scanned with CamScanner In customer menu, a user is asked to choose a tas! see personal details, see transaction history, edit in CUSTONER NENU Pe) PMc sec) 3 4) Ny Transaction History Eee Ga mately Which’ operation to perform? Figure 4: Customer Menu Sample output for user. A list of four function is displayed in Admin Menu, U: Seen CL ee PoC rn ett Pe a Pee cr Rg rs Pe aes Cuneo = k among 6 different menus. Deposit, withdraw, nformation and logout are the options available Figure 5: Admin Menu Sample output ser can input the chcice he/shé likes to _— a execute and proceed further for the displayed actions. 31 Scanned with CamScanner ed Pets a ary Peter mR Led rd FRG mt ey Lec Mamet nm TE) Seamer mT Erie) Famers tIS Mem tCera IT} CESS cca ptt Ue me Mma TM Rt Camis ENTLY Paty YU TET TS) Svea eet TTY pret) Dances Poona II) Pecan tomes: a Ponty TC Ed Ce en eae oy Figure 6: User List Sample output When an admin chooses view user list function, the list is previewed as shown in the figure above. The users are sorted according to their ID number. The admin gets to see the details like name, address, username, password, date of birth, phone number, balance etc. Le foerecrny ord ee es con Pe res Ee oo) c ce eT se Prerecoc) A Cee an Figure 7: Removed User List Sample output ‘The removed user's list is displayed as in the above figure. They are sorted according to the time they were deleted. The newly deleted user is listed at the bottom of the list. Le 32 Scanned with CamScanner Your Transaction 10: 13 Enter Amount to Deposit ($): 8000 PR SRC COME Ue os Ce Oe Dice gear Figure 8: Deposit Menu Sample output The customer can deposit desired amount of money as shown in the figure above. They are asked to enter the amount to deposit and after entering the desired amount to deposit, the amount is deposited to their account number. rn Pas $ 1009.000000 has been withdrawn from your account! SUcas Mare ces Pee EEL) festa rescue Coed Dre a a Figure 9: Withdraw Sample output In withdraw menu when a user inputs certain amount to withdraw, the above output is shown. In the above figure, the user entered $1000 withdraw and the output is shown, Ye 33 Scanned with CamScanner After perforn ened ry 2 Fa Fr rd Fg ry 2 oa) Peery ety rT Pretty) FEET pera ret) PET) ro inte? srry artery regs racer rot) og Prem) Font Eerie) Fe Ea Par) SR eC) Cee RR) Transaction ato Pec OEY Soe ORT EE ETS EY eT EEE Figure 10: Transaction History Sample output 1g any type of transaction, the tran: separate function to access the transaction history ofa customer. The tion record is stored in file and there is above figure shows the output when user chooses to see the transaction history from customer menu. 34 Le a, Sere ens hurt gewems quick geod Scanned with CamScanner 8. Conclusion MUBMS is a console based non graphical application compiled using C-Programming language. The application was developed with the aim to provide quality mobile banking experience to the customers and a database management plattorm for the bank, With the use of this application, the administrators can increase their productivity with a lot of work done in few seconds of time, The easy, smooth and fast operation of the app will definitely serve customer in reliable manner. With the database management of the customers, the hank ean perform smoothly without being engaged in database paperwork and filing, The development of this mini project helped me in depth understanding of the C-Programming concepts like iterative constructs, arrays, structures, conditional statements. Moreover, it helped me to develop logical understanding and thinking. 9. References Tutorial point, 2018. C_header file. [Online] Available at: hutps://www.tutorialspoint.com/cprogramming/c_header_files.htm [Accessed 22 02 2020]. Leam-c.org. (2019). Learn C- Free Interactive C Tutorial. [online] Available at: hutpsv/Avww.lean-c.org/. wwww.programiz.com. (n.d.). C siruet (Structures). [online] Available at: https://www.programiz.com/e-programming/e-structures. a K Cone luo and releLehce — Shoe bein dither sh le eo peges- be x Very fe weer ehees Lis) — Mmve: 35 Scanned with CamScanner

You might also like