Question: Write a method called segmentState which will concatenate all object state into one string, then will return a portion of that string based upon the

Write a method called "segmentState" which will concatenate all object state into one string, then will return a portion of that string based upon the first and last number of the passengers ticket number in which we will assume that the first number is smaller than the last number and that the last number is no greater than the total number of characters in the concatenated string. (Do not test for this just assume it will be the case when you test) . For example, let's assume the following: first name - Peter last name - Smith flight number - 346 seat number - 34 ticket number -45612857 the fully concatenated string would be: "PeterSmith3463445612857" the return value of the method for this example would be: "rSm"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!