![]() |
Lab-0 |
Classpath, Packages, Jar Files, Reflection, JDBC |
Bundle1.class
.
It is known that this class has a default constructor and a method called
operate
that takes two int's and return an int. Write the class
Use1.java
that acts as a client of Bundle1
;
specifically, it passes 2
and 3
to operate
and captures and outputs the return.
Use2.java
that acts as a client of
Bundle2.class
. This is
similar to (1) above but you now need to examine the resulting
compile-time error and figure out a solution; i.e. make the client work.
Use3.java
that acts as a client of
Bundle3.class
which is given in the jar file
bun.jar
. This is
similar to (1) but you now need to use the jar
command, with the correct command-line options, to verify that it
does indeed contain a file named Bundle3.class
. Can you
extract the file out of the jar? Where will you store it? Could
you have made the client work without extracting?
jar.txt
in
RD under "java".
Use4.java
that acts as a client of
Bundle4.class
. This is
similar to (1) above but you now need to examine the resulting
compile-time error and figure out a solution; i.e. make the client work.
operate
!
See the reflection
pseudocode in RD under "java".
axis.jar
contains an app named tcpmon
(recall that an app is
something that you launch, not invoke). Your job is simply to
run this app. No coding is involved here, just determine the
correct command to launch this app.
Northwind.mdb
is a Microsoft Access database. It contains a table named Products
.
Create a SQL query within MS-Access to determines the products whose unit price
is over $100. Create a second query to determines if any Beverages have a unit
price over $100. Note that each product has a category and this one-to-many
relation is manifested by having each product hold a category ID that points
to the Categories
table.
Products
table of the previous question from its Microsoft Access database
(running under Windows on your PC) to an IBM DB2 database (running
under Linux/Unix on red
). How will you accomplish this
task?