Java Bank Account
Demo of Program Execution
Screen Shot of Directory Listing
Screen Shot of Sample Execution
Detailed description:
"Now we'd like to do some compilation.
I have a file that is the source code for
the bank account, and it's called BankAccount.java. To compile
this code, we use the javac command. Let me show you this
on the command line. I'm currently several levels deep in directories,
and if you look at the screen, you'll see that we have BankAccount.java
there.
To execute the compiler, we type
in javac BankAccount.java. We have to
specify the suffix. And also remember that the upper and lower
case convention must be followed and that it must match the internal class
name. So we couldn't type in bankaccount.java. The file
name must match the class name.
Next the compiler, the Java compiler,
says it's compiling BankAccount.java. And if you look at the results,
we now have a .class file in our directory in addition to the .java file,
which is the byte code that's been representing the bank account class.
So now we have a bank account .class file as a result. What we need
to do now is to run the program and get the results."
|