Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assignment 6- A Triple String Class Understand the Application The assignment is to first create a class called TripleString. TripleString will consist of three private

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Assignment 6- A Triple String Class Understand the Application The assignment is to first create a class called TripleString. TripleString will consist of three private member Strings as its basic data. There will be few instance methods to support that data. Once defined, we will use it to instantiate TripleString objects that can be used in our main0 method. In a later assignment, the TripleString class will help us create a more involved application. TripleString will contain three private member Strings as its main data: string1, string2, and string3. We will also add a few public static member such as final int MAX_LEN and MIN_LEN. These represents the maximum and minimum length that our class will allow any of its strings to be set to. We can use these static members in the TripleString method whose job it is to test for valid strings (see below). The Program Spec Class TripleString Spec Private Class Instance Members: String string1 String string2 String string3 All legal strings should be between 1 and 50 characters. As stated in the modules, we never want to see a literal in our methods. So the class should have static members to hold values for the limits described above, as well as default values for any field that is construct-ed using illegal arguments from the client. These are put in the public static section Public Class Static Constants (declare to be final): MIN LEN-1 MAX LEN-50 DEFAULT-STRING = " (undefined)

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

Step: 3

blur-text-image

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

ISBN: 0619064625, 978-0619064624

More Books

Students also viewed these Databases questions