Question: Java The client saves dimensions of packages in the inventory in a text file. While it sounds nefficient, the client is an angel from programmer's
The client saves dimensions of packages in the inventory in a text file. While it sounds nefficient, the client is an angel from programmer's point of view. This is because it is possible to write a program that will directly read from the file and create a summary of the inventory. A sample file is shown below. 20 10 8 4.5 8.45 12.2 8.0 2.5 4.0 1.0 15.0 18.0 3.5 3.5 3.5 6.0 5.0 10.0 That is, each line contains the width, height, and length of a package. The dimensions are separated by spaces Assignment: You need to write a program using object oriented packages. That is, each package must be considered an object. To achieve this, you must write a class named Package. Make sure to create a Java file for the Package class Some other required properties of the Package class are as follows. programming idea for 1. All status variables of the Package class must be private. 2. Write no more than two constructors. 3. Must have a public method named getvolume() that will return the volume of the package. 4. Must have a public method named iscube ) that will return true if the package is cubic, false otherwise. 5. The Package class must NOT contain any main method. Feel free to write any additional method in the Package class, as you see fit. The program file (the Java file that contains the main method) must be written in a file named Runner.java. The Runner class must not have any status variable. Runner must have the following functionalities. Each functionality must be implemented in a separate method in Runner
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
