Tuesday, June 19, 2012

When we do not put semicolon at the end of the java statement?

When any statement is followed by any curley('{') braces then that statement must not end with semicolon(;).
For example:- class name or any function name must not end with semicolon. Similarly any looping statement, switch , if or else statement must not end with semicolon.


Tuesday, June 5, 2012

63 students got 90% and above in computer application under my teaching this year in icse- 2012 exam. and 17 students out of 28 got above 90% and rest got 80% and above in ISC-2012 exam. in computer science.


Friday, June 1, 2012

Banking project program for ICSE students (develop in bluej java)


import java.io.* ;
class banking
{
public void display() throws IOException
{
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
System.out.println ("WELCOME TO STATE BANK OF INDIA ");
String a[]= new String[100];
System.out.println("Enter your name:");
for (int k=0;k<100;k++)
{
a[k]=r.readLine();


int ac[]=new int[100];
int Bal[]=new int[100];
for ( k=0;k<100;k++)
{
ac[k]=0;
Bal[k]=0;
}
int x=372;
int i=0,amt=0;
for( i=0;i<=49;i++)
Bal[i]=10000;
System.out.println("The permanent members are :- ");
for(int j=0;j<=49;j++)
{
System.out.println(a[j]+ "has ac no ."+ac[j]);
}
System.out.println("You a permanent member : Y / N ");
String x1=r.readLine();
if(x1.equalsIgnoreCase("Y"))
{
System.out.println("Please enter your accont no.");
int b = Integer.parseInt(r.readLine());
int pos=-1;
for(int j=0;j<=49;j++)
{
if(ac[j]==b);
{
pos=j;
break;
}
}

if(pos!=-1)
{
System.out.println("Your balance is :" + Bal[pos]+ "You can deposit or Withdrawal money : Press 1 for Deposit money and Press 2 for Withdrawal money ");
int c=Integer.parseInt(r.readLine());
if(c==1)
{
System.out.println("Please enter the amt you want to deposit ");
amt=Integer.parseInt(r.readLine());
Bal[pos]=Bal[pos]+amt;
}
else if (c==2)
{
System.out.println("Please enter the amt you want to withdrawal");
amt=Integer.parseInt(r.readLine());
if((Bal[pos]-amt)>1000)
Bal[pos]=Bal[pos]-amt;
else
System.out.println("Warning ! Your balance is "+Bal[pos]+ "and so you cannot withdrawal" +amt+ "as the balance become"+(Bal[pos]-amt)+ "Which is less than Rs.1000 the minimum balance to be kept in this accont ");
}
else
{
System.out.println("You have made wrong entry !!!!!");
System.out.println("Thanking you , Have a good day.");
}
if(x1.equalsIgnoreCase("N"))
{
System.out.println("How many accounts do you want to create");
b=Integer.parseInt(r.readLine());
Bal[i]=amt;
}
System.out.println("Now do you want to Withdraw or Deposit money Y or N ");
String xx=r.readLine();
if(xx.equalsIgnoreCase("Y"))
{
System.out.println ("Press 1 to Deposit and 2 for Withdraw Money ");
int xxx=Integer.parseInt(r.readLine());
System.out.println("Enter your Ac no ");
c = Integer.parseInt(r.readLine());
int pose=-1;
for(int j=50;j<100;j++)
{
if(ac[j]==c)
{
pos=j;
break;
}
}
if(pos>-1)
{
if(xxx==1)
{
System.out.println ("Enter the amount you want to deposit ");
amt=Integer.parseInt(r.readLine());
Bal[pos]=Bal[pos]+amt+i;
}
else if(xxx==2)
{
System.out.println("Enter the amt you want to Withdraw");
int amt1=Integer.parseInt(r.readLine());
if((Bal[pos]-amt1)>1000)
Bal[pos]=Bal[pos]-amt;
else
System.out.println("Warning !!!!!");
}
else
System.out.println("Wrong entry ");
}
}
System.out.println("Thanking you ");
}
else
System.out.println("Thank you , Have a nice day ");
}
}
}}

/* input-output
* enter your name:-
* Arnab sarkar

* You a permanent member : Y / N
y
Please enter your accont no.
111
Your balance is :10000You can deposit or Withdrawal money : Press 1 for Deposit money and Press 2 for Withdrawal money
1
Please enter the amt you want to deposit
5000
Now do you want to Withdraw or Deposit money Y or N
n
your balance is 15000
Thank you , Have a nice day

*/














Sunday, May 29, 2011

Thursday, December 2, 2010

2nd class on bluej(java) for icse/isc students

Day-2 tips:
when  we use loop in a program?
when we want to repeat same statement then we use loop.
In our real life when we play musical chair you can see that same chair come to us each and evry time. Or see your watch (not digital) , the hour hand repeat same number(1 to 12) . this is loop.




see my personal website

Wednesday, December 1, 2010

First class on Bluej(subrata sir,east west model school)

Todays Tip:

Most of the icse/isc computer students/ some teachers  think that java(bluej) program means some specific questions(year solved paper) and answer is enough and that teacher is good whose suggestion fit with the exam. question paper.
But this is totally wrong. As a teacher (12+ years expirenced in isc/icse/cbse) i saw if a teacher give proper logic and syntax of java and tricks how to remember program then any type of student get 100% sucess.

For example:- Most of the student confuse that where they put semicolon(;) and where not in java statement.
But if a teacher give real life example what is meant by semicolon then a little student can easily understand.

I say that your home boundary wall enclose your house and gate stop to enter any body to your house.
similarly, semicolon means there is end and no boundary wall after that statement.

But student cannot remember it.
So, tell them that this is and this (class and methods) must followed by curley"{" braces so these statement must not end with semi colon and put semi colon rest( because little child first learn class and methods only).

Tips: 2 next time we discuss..........................subrataray.indiv.in