Project #1
(Asset Report)
(Due 24 Jan 07
and 5 Feb 07)
Wood Stuff Inc. sells wood furniture accessories (shelves, bookcases, entertainment centers, cupboards, etc.), usually wholesale to low-cost housing contractors. It is a small business with a very limited inventory of parts and a small stock of products on hand. It is the end of the fiscal year and the company auditors need to create a report about the company's assets.
The component inventory listing is held in the file, inventory.txt. Each line of this file contains the specification for one of the parts used in one or more of Wood Stuff Inc.'s products. There are fewer than 100 different parts. The specifications have colons separating each field (data item) from the next and are in the following form:
Part-No:Description:Supplier:Cost-per-part:Quantity-on-hand:Minimum-quantity-allowed
Here are the first few components to give you an example. The part number is a 5-digit number; the description may contain several words; the supplier is a company name; the cost per part is measured in dollars and cents; the quantity on hand and the minimum quantity allowed are integers. The last value represents the point at which more parts need to be ordered - when the quantity on hand dips below it.
10244:felt bumper pads:Soft Stuff Inc.:0.02:8510:2500
10398:screw covers:Soft Stuff Inc.:0.01:4535:3000
18560:3/4" cam bolt:Acme Co.:0.14:2430:500
Part of the asset report is to list each component part by its part number and its description, along with the quantity on hand and their value. The value for each part is simply the cost per part times the quantity on hand. This part of the report should have a table form, such as
PartNo Description
On Hand Value
10244 felt bumper pads
8510 $ 170.20
10398 screw covers
4535 $ 45.35
18560 3/4" cam bolt
2430 $ 340.20
The stock listing is held in the file, products.txt. Each line of this file contains specifications about the parts which go into one product. There are fewer than 50 products. The specifications have colons separating each field (data item) from the next and are in the following form:
Model-No:Description:Quantity-on-hand:Aggregate-labor:needed:part-no:quantity:part-no: . . .
Here are a couple of examples of products. The model number is a 4-digit number; the description may contain several words; the quantity on hand is an integer; the aggregate labor is often a floating point number; the "needed" for a part may be an integer or floating point number; the part number is a 5-digit number that refers to a part in the inventory file. The aggregate labor is the number of collective work hours required to produce the product. The product may have any number of needed:part-number pairs to specify the components of the product.
5406:maple shelves:48:1.6:0.5:36701:0.5:36720:2:33124:18:40805:12:40802:1:22204
5408:oak shelves:37:1.5:0.5:36702:0.5:36712:24:41092:24:10398:1:22204
5440:plain shelves:52:1.4:1:36702:24:38023:1:22204
Part of the asset report is to list each of the products in stock and their value. The value for each product is calculated as the sales price times the quantity on hand. The sales price for a product is calculated from the sum of three elements: cost of materials, cost of labor, and cost of packaging. The cost of materials is the sum of the cost per part times the number of parts used for each part used to make the product. The cost of labor is the number of aggregate work hours times the standard cost per hour (currently set at $12.33). The cost of packaging is a standard percentage (currently set at 4%) of the cost of the materials. The sales price is the sum of the three costs multiplied by the markup (currently set at 155%). This part of the report should have a form such as the following:
Model Description
OnHand Price Value
5406 maple shelves
48 $ 52.98 $ 2542.90
5408 oak shelves
37 $ 51.69 $ 1912.70
5440 plain shelves
52 $ 43.38 $ 2255.54
You are to write a program that reads the two files and produces the assets report in the form described above. In addition to showing the value of each part and product on hand, your program must show the total value of the inventory parts and the total value of the stock on hand.
You are required to do this project in two stages.
In the first stage, you must hand in a UML class diagram showing how you intend to construct the program. The class diagram must conform to the description given in class and the UML handout and show each class you intend to use, its instance variables and methods. It must also show the associations between the classes needed to perform the task. The UML diagram is due on 24 Jan 07.
In the second stage, you must hand in a printout of your well documented program and the output that it generates (the assets report). You must create a folder named p1 under the folder named after you on the P: drive for COSC 310. Copy into the p1 folder all .java files that you created for this project. If you have placed the .java files in a package, copy the entire package to the p1 folder. The program is due on 5 Feb 07.
Note: These files and the classes
that you design for this project are used in project #2.