Friday, 16 January 2015

Bank Application in java

import java.util.*;
public class BankAccount 
{
Scanner sc=new Scanner(System.in);
 String name;
 int accno;
 int y;
 float r,i,t,bal,amt;
void getdata(String name,int accno)
   {
  this.name=name;
  this.accno=accno;
   }
 float deposit()
   {
System.out.print("enter amount to deposit");
amt=sc.nextFloat();
if(amt<0)
 {
System.out.print("Please re-enter amount to deposit");
    return 1;
 }
bal=bal+amt;
 return 0;
   }

 void display()
 {
 System.out.println(name);
 System.out.println(accno);
 System.out.println(bal);
 }

 }
class Current extends BankAccount

float withdraw()
   {
 System.out.print("enter amount to withdraw");
 amt=sc.nextFloat();
 if(bal<amt)
 {
 System.out.print("insufficient balance");
 return 1;
 }
 bal=bal-amt;
 return 0;
   }
}

class Saving extends BankAccount{
float interest()
 {
 if(bal!=0)
 {
   System.out.print("enter amount years and rate");
// a=sc.nextFloat();
   y=sc.nextInt();
    r=sc.nextFloat();
    System.out.println("bal is"+bal);
   i=(bal*y*r)/100; 
   System.out.println("interest is"+i);
   t=bal+i;
   System.out.println("t is"+t);
 }
 return 0;  
 }
}
import java.util.Scanner;
public class Test {
private static Scanner sc;

public static void main(String[] args)throws Exception
{
 Saving s=new Saving();
Current c=new Current();
sc = new Scanner(System.in);
int z,y;
int menu,n1;
String st,st1="";
System.out.println("Enter your option \n 1: savings 2: current");
z=sc.nextInt();
switch(z)
{
case 1:
String type="savings";
// System.out.println("enter name");
//  st1=sc.nextLine();
// st=st1;
st="rupa";
System.out.println("enter account number");
 n1=sc.nextInt();
s.getdata(st,n1);
//boolean quit=false;
//while(!quit)
do
{
System.out.print("enter your choice \n 1.deposit amount 2. display 3.interest 4.exit ");
 menu=sc.nextInt();
   switch(menu)
   {
    case 1:
  s.deposit();
  break;
    case 2:
   s.display();
   break;
    case 3:
     s.interest();
     break;
    case 4:
// System.out.print(0);
    break;
     }
}while(menu<=5);//end of while
break;
case 2:type="current";
//System.out.println("enter name");
// st=sc.nextLine();
 st="swarupa";
 System.out.println(st);
System.out.println("enter account number");
 n1=sc.nextInt();
 c.getdata(st,n1);
do
{
System.out.print("enter your choice \n 1.deposit amount 2.withdraw 3. display  4.exit ");
 y=sc.nextInt();
   switch(y)
   {
    case 1:
  c.deposit();
  break;
    case 2:
  c.withdraw();
   break;
    case 3:
   c.display();
   break;
    case 4:
    break;
     }
}while(y<=5);
break;
}
}
}

Some tricky interview questions

  1. What can you do for us that someone else can't?
  2. What's the difference between hard work and smart work?
  3. If you win $10 million lottery, would you still work?
  4. Do you have any questions for me?
  5. Tell me your three weaknesses
  6. How would your friends or co-workers describe you?
  7. Are you a team player?Describe your ability to deal with conflict
  8. What is your philosophy towards work?
  9. How do you plan to achieve these goals?
  10. What has been your greatest accomplishment?
  11. Do you consider yourself successful?
  12. On a scale of one to ten, rate me as an interviewer.
  13. Tell me something negative you’ve heard about our company
  14. Why should I hire you from the outside when I could promote someone from within?
  15. How much money do you want ?

Personal interview questions


Where do u see urself in 10 years?
want to be more responsible and respected positions.Hopefully I''ll be alive,healthy,happy and thriving in this career

What motivates u to do a good job?
want to be in a better position and help others or be a leader in your field

What is your greatest strengths?
thrive under pressure,a great motivator,problem solver

Would u rather be liked or feared?
neither,I'd rather be respected

any questions to the company
"how soon could I start,if I were offered the job
on what I would be working on

tell about urself?
hardworker,quick and eager learner,flexible person and can be successful at any kind of works. grow professionally,fast paced and very challenging

why did u decide to interview for this positon?
working for a firm that values all of ur skills. desire to be part of a firm that is growing

What is your greatest weakness
my greatest weakness is that I get too personally involved with my work

We Value Creativity Among Our Employees With That In Mind.What Kind Of Plant Would U Be And Why
I would be a tree,bcoz they are tall,strong and live a long life.

Whats ur long range objective?
within 5 years I would like to become the very best in ur company

Why should i hire you
I am passionately committed to produce truly world class results

If u had to live life over again, what one thing u change about yourself?
I am overall very happy with where I am at in my life. the one I likely would have to changed would be focusing earlier on my chosen carrier

If u dont get hired by our firm, what will u do?

analyze what could have done better during the interview.then take that knowledge with me  into next interview

Do u have questions for me?
will I have office keys so that I could work on weekends
is there anything I can do to improve my chances of working for the firm

general skills you are possessing
I think i have excellent leadership qualities which i have acquired through combination of  effective communication

Questions to be asked at the end of the interview

  1. Could you tell me the growth plans and goals for the company?
  2. What skills are important to be successful in this position?
  3. With whom will I be interacting most frequently and what are their responsibilities and the nature of our   interaction
  4. What is the time frame for making a decision at this position?
  5. What made the previous persons in this position successful/unsuccessful?
  6. What future direction do you see the company taking?
  7. How do you differ from your competitors?
  8. How much responsibility will I be given in this position?
  9. Can you tell me more about the training program?
  10. What criteria will be used to evaluate my performance?
  11. Will I work independently or as part of a team?
  12. How did you advance to your position?
  13. What are the career paths available in this organization?
  14. When can I expect to hear from you regarding this position?
  15. How soon will I be able to be productive?
  16. What type of projects will I be able to assist on?