create a java application

已取消 已发布的 7 年前 货到付款
已取消 货到付款

Create a Shipment class.

Class must have private variables and public methods.

Create both a no parameter constructor and an all parameter constructor.

Create get and set methods for all variables.

Create a toString method.

Create a shipRate method . Do not store rate as an instance variable. It is passed nothing and returns a double which is calculated each time the method is called.

Create methods in Shipment to check for max weight, max volume, and max rate and return a Boolean true if they are exceeded.

Create a compareTo method based on shipmentId so Shipments can be sorted in an array or ArrayList. You will need to implement Comparable on the class header.

In all methods other than sets and gets, use your get and set methods to access shipmentWeight and shipmentCube.

Implement ShipmentConstantsInterface on the Shipment object class header.

Part B: ShipmentObjectProcessor

Description: Shipment rate calculator file loop.

Steps:

Create a file named [url removed, login to view] with Notepad with one shipment per line and fields separated by commas.

Read multiple shipments from a file until shipmentId of "END" is found:

String shipmentID

double shipmentWeight

double shipmentCube

Process all Shipments by storing the data elements in an instance of Shipment as the data is read from a file.

Process all Shipments using the methods in the Shipment object such as the set methods, to calculate rate, and check for exceeding maximums. Do display errors as they are read and do not store those shipments

Do not display each individual shipment as they are being read.

Create an ArrayList<Shipment> and store all shipment objects in it.

At end of the loop, sort the ArrayList and print each Shipment using an enhanced for loop and the toString method.

Calculate and store the count of shipments processed and the total calculated rate.

App Design 应用程序开发 Java Perl Python

项目ID: #11953289

关于项目

9个方案 远程项目 活跃的7 年前

有9名威客正在参与此工作的竞标,均价$109/小时

dghq123

Hi there.. I have read your project details completely and willing to do it for you... Check my recent reviews for our quality work on on time delivery :) Please inbox and we can discuss about project and I will re 更多

$150 USD 在3天内
(15条评论)
4.8
VnNorthStar

Hi I'm ready for this project. I'm expert in C, C++, Java & .NET development, also algorithms, Web, Mobile, Desktop applications. Please give me more detail. I will do it perfectly. Best Regards VnNorthStar

$50 USD 在3天内
(17条评论)
3.5
kelashkhatri

Hello, I am interested in providing you the solution of your Java project, consisting the concept of Multiple class with method overloading and accessor methods for accessing the data of class.

$155 USD 在3天内
(0条评论)
0.0