Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm trying to draft two constructors (one single parameter and one double parameter listed below): public CustomerException(msg:String) : CustomerException ---- Single-parameter constructor used for initial

I'm trying to draft two constructors (one single parameter and one double parameter listed below):

public CustomerException(msg:String) : CustomerException ---- Single-parameter constructor used for initial throw of exception type

public CustomerException(msg: String, cause: Throwable) : CustomerException ----- Two-parameter constructor for use when chaining the exception type

The attributes for this code are as follows:

String custNumber: 7 digits in length, greater than 10,000

String tin: 9 digits in length

String last: Null or blank values not permitted

String first: Null or blank values not permitted

int margin: negative values not permitted

boolean drip:

boolean futures:

The following exceptions will be thrown when the items entered are outside the set values of the aforementioned attributes.

EXPECTED RESULTS

CustomerException thrown The margin value must be zero or greater. Offered values: Customer number: 1000002 Tax Id: 321654987 Last Name: Blackwood First Name: Charlotte Margin: -1 DRIP: false Futures: false

CustomerException thrown Tax Identifier must be 9 digits in length. Offered values: Customer number: 1009999 Tax Id: nnnnnnnnn Last Name: Social First Name: Nonnum Margin: 5000 DRIP: true Futures: false

CustomerException thrown First name must not be null or blank. Offered values: Customer number: 2009999 Tax Id: 951263874 Last Name: MissingFirst First Name: Margin: 50000 DRIP: true Futures: false

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

What are the functions of top management?

Answered: 1 week ago

Question

Bring out the limitations of planning.

Answered: 1 week ago

Question

Why should a business be socially responsible?

Answered: 1 week ago

Question

Discuss the general principles of management given by Henri Fayol

Answered: 1 week ago