About Our Blog

Blogroll

Blogger templates

Showing posts with label Codes. Show all posts
Showing posts with label Codes. Show all posts

ATM machine program (Sample JAVA program question)

Write a program that design ATM machine with extra function for EXIM BANK

 

1st Shot

2nd Shot
 
3rd


 Study or Copy and paste below codes:


import java.util.Scanner;
class assignment
{
public static void main(String [] args) {
Scanner take=new Scanner(System.in);

System.out.println("***********************************************************************");
System.out.println("***********************************************************************");
System.out.println("**********************WELCOME TO EXIM BANK*****************************");
System.out.println();
System.out.println();

System.out.println(" \t    Please press \"1\" to continue Or \"0\" to quit");

//verification to continue
for(int i = 1; i>0;i++)
 {
 int go = take.nextInt();
 if (go == 1){
 break;
 }
 else if (go == 0){
 System.out.println("You have choosen to exit, Bye Bye Bye...");
 System.exit(0);
 break;
 }

Creating Database with MySQL (Commands to create Sample database with five related tables)


Lets assume we want to create a database for the company named GROUP4, and  is in need of database that contains five tables, Which are Managers, Departments, Suppliers, Customers/Clients and Products.
 
1. Demonstration of ERD:
ENTITY RELATIONSHIP DIAGRAM

GROUP4 | ERD
The ERD of GROUP4 Database
 
2. Demonstration of MySQL Commands/Statements:
(You can copy these commands and paste them in your MySQL console then execute; they will work fine. )
 
 
DROP DATABASE IF EXISTS GROUP4;
create database GROUP4;
use GROUP4;
create table Manager
(
MANID CHAR(4),
FNAME VARCHAR(20) NOT NULL,
LNAME VARCHAR(20) NOT NULL,

Input, array and for loop snippet program (Java sample tha let user input six(6) integer values then display them, find total and average)



Java sample program that let user to enter six(6) random integer values then display them, find its total and average

 
import java.util.Scanner;
class maquery3
{
 public static void main(String[]args)
  {
   Scanner y = new Scanner(System.in);
   int m;
   double sum = 0, avg;
   int num[] = new int[7];
   System.out.println();
   System.out.println();
   System.out.println();
   System.out.println("Enter 6 randoms numbers");
   for(m=1;m<=6;m++)
    {
     num[m] = y.nextInt();
    }
   System.out.println();
   System.out.println();
   System.out.println();
   for(m=1;m<=6;m++)
    {
     System.out.println(num[m]);
     sum += num[m];
  

ATM machine program (Sample Turbo pascal program question)

Write a program that design ATM machine for MBA BANK


The program should load like this...
1) Welcome screen with the word "Welcome to MBA Bank"
2) When you click enter key the system should allow user to enter account open details
like(Full name, sex, account number, Amount and Pin/password)
3) After entering all above 2 details system should desplay message "Congratulation for working with MBA Bank"
4) The program should have the choice of Transaction 0-quit 1-view balance, 2-deposit, 3-withdraw
5) When user enter 0 as his choice  system should close otherwise sytem should be able to withdraw, deposit or view balance
6)For user to view balance or withdraw must enter  his pin to validate his/her account before he view balance or with draw


Program ATM;
uses wincrt;

var pin,m,x,y:integer;
an,fname,sex:string;
withdraw,amount,namount,draw:real;
keey,chose:char;

begin

writeln('Welcome to MBA Bank');
readln;



writeln('Enter your fullname');
readln(fname);



writeln('Enter your sex');
readln(sex);
 

What do you want to know?

Simple Programing (creating your own useful programs or simple programs for funny)

Simple hacking tricks (funny tricks like Facebook friends accounts hacking tricks etc.)
Notepad tricks and codes
Cmd tricks and codes e.tc.

This blog is still in progress anything which does not posted yet you can request it, you can use this email: steven_washokera@yahoo.com or just write what you want to learn in the comment box and then I 'll post it to you ASAP! (I 'll make it first)

Ads