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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started