[5pts]
Continuing from the previous example, how many
instances of class Rat are created when this program is run?
How many instances of class String are created
when the function read() is called, assuming the
user inputs name & weight properly.
Explain your answers! [Note: "instance" is a technical term.
Read the notes!]

How would you call the function fact to compute 15 factorial
from the main function of another .java file (assume it is
HW.java)? If you run the program from HW.java (i.e. give the
command java HW), how does the JVM know where to
find the code for the fact function?

A createMid() method that takes no arguments. It must create a Scanner and asks
the user for the information necessary to construct a Mid. It then returns
that Mid.

A printMid() method that takes a Mid as an argument and prints the information
about that Mid to the screen.

When you print the alpha code, any leading zeros should print properly. For example: '012226'

A main() method that asks how many Mids you would like to enter, then
creates an array of that many Mids. It uses your createMid() function to fill that
array up with constructed Mids. It then asks the user for a company number,
and uses your printMid() function to print the information about all mids in that
company to the screen.

You should have two files, 'Mid.java' and 'HW3.java'

Compiling!: with two files, just run javac Mid.java HW3.java or the broader javac *.java

An example run:

~/$ java HW3
How many mids? 3
Alpha? 160006
First name? George
Last name? Finklehoffer
Company? 3
Alpha? 160012
First name? John
Last name? Jingleheimer-Smith
Company? 4
Alpha? 160018
First name? Sterling
Last name? Hotchkiss
Company? 3
What company would you like to print out? 3
160006 Finklehoffer George 3
160018 Hotchkiss Sterling 3

Your input and output should be exactly as it is above.

Turn In
This sheet (filled in with answers!), a printout (using codeprint)
of your code, and a screenshot of it running on the above input.
Note: you can print both source code files at once with codeprint
like this: codeprint HW3.java Mid.java