chapter 16 projects

Upload: deepakkattimani

Post on 05-Jul-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/16/2019 Chapter 16 Projects

    1/18

    Chapter 16 Projects

    1. [after §16.12] Animated Garage Door **:

    his pro!"em as#s $o% to mode" and sim%"ate an a%tomatic garage door and its contro" s$stem. &o%r program sho%"d contain three c"asses' a GarageDoor c"ass' a ButtonSwitch c"ass' and aGarageDoorDriver c"ass. (se a 6)) pi+e" ,ide !$ -)) pi+e" high JFrame ,indo, to representthe front of the garage' and %se a hori onta""$ centered /aria!"e height !"ac# rectang"e in that ,indo,to represent the garage door. 0epresent the !%tton s,itch !$ a separate ,indo, on the right' fi""ed !$a sing"e !%tton "a!e"ed C"ic# ere.

    3nitia""$' the !"ac# rectang"e sho%"d fi"" the ,ho"e height of the garage' ,ith "ight /ertica" stripes oneach side representing ,a"" area on either side of the door. 4hen a %ser c"ic#s the !%tton' the doorsho%"d start mo/ing %p. hat is' the !"ac# rectang"e sho%"d shrin# %p,ard %nti" it disappears at thetop after a!o%t 5 seconds. At an$ time ,hi"e the door is mo/ing %p' if the %ser c"ic#s the !%tton again'the door sho%"d stop mo/ing ,here/er it is ,hen the !%tton is c"ic#ed. hen if the %ser c"ic#s the

    !%tton again' the door sho%"d start mo/ing in the opposite direction. he stopping on one c"ic# andthen re/ersing on the ne+t c"ic# sho%"d ,or# for initia" motion in either direction. 3f the %ser does notstop the door ,hi"e it is mo/ing' the door sho%"d tra/e" a"" the ,a$ open or c"osed and then stop therea%tomatica""$.

    ere is ,hat $o% sho%"d see ,hen the door is a!o%t one fo%rth open:

    otice that there is no tit"e !ar aro%nd the !%tton s,itch. &o% can get this !are !ones effect !$inc"%ding this statement in that ,indo,7s constr%ctor:

    setUndecorated(true);

    Constr%ct the garage door as an arra$ of 82 hori onta" segments' "aid o%t !$ this statement:

    setLayout(new FlowLayout(FlowLayout. !"#!$% &% ' ));

    1

  • 8/16/2019 Chapter 16 Projects

    2/18

    3n this statement' the first FlowLayout constr%ctor arg%ment centers each "a!e" hori onta""$ in themidd"e. he third FlowLayout constr%ctor arg%ment trims the top and !ottom of each segment tored%ce its height so that 82 of these segments appro+imate"$ fit into the -)) pi+e" high ,indo,.9 hese "a$o%t manager t,ea#s ,i"" !e e+p"ained in more detai" in the ne+t chapter.

    ;a#e each segment !e a JLa*el containing a String of -) short !"ac# !ars' each specified !$>7' "i#e this:

    char+, oneSegment - new char+ &,;/or (int i-&; i0oneSegment.length; i11)2 oneSegment+i, - 34u 5663; 77 a solid *o89

    hen' as $o% add each of the 82 segments to the door' %se new String(oneSegment) for theJLa*el arg%ment.

    3n the GarageDoor constr%ctor' a"so inc"%de the statement:

    timer - new #imer(D!L: % new #imerListener());

    #imer is an AP3 c"ass in the

  • 8/16/2019 Chapter 16 Projects

    3/18

    and increment the state' mod%"o - that is' if the state is 1' ma#e the ne+t state 2' !%t if the state is F'ma#e the ne+t state ).

    he ButtonSwitch c"ass7s constr%ctor sho%"d ha/e one parameter' a reference to a partic%"arGarageDoor o!ject' and it sho%"d initia"i e a ButtonSwitch instance /aria!"e ca""ed door . hiscorresponds to HprogrammingI the remote contro""er so that its transmitted 3D matches the 3D of thedoor act%ator inside $o%r garage' rather than one of $o%r neigh!or7s garagesJ his constr%ctor sho%"d%se the setSiCe and setLocation methods inherited from the

  • 8/16/2019 Chapter 16 Projects

    4/18

    he opening dia"og !o+: After c"osing the dia"og !o+' here7s themain ,indo,:

    After t$ping the first co"or: After pressing enter and then t$ping the secondco"or:

    After entering a"" fi/e co"ors correct"$:

    -

  • 8/16/2019 Chapter 16 Projects

    5/18

  • 8/16/2019 Chapter 16 Projects

    6/18

    After c"osing the dia"og !o+' here7s the main After c"ic#ing the hint !%tton:,indo,:

    After t$ping the first co"or: After pressing enter and c"ic#ing the hint !%tton:

    After entering a"" fi/e co"ors correct"$:

    3. [after §16.1-] Grocer$ 3n/entor$ G(3 ***:

    his is a G(3 /ersion of Chapter 1F7s Grocer$ tore 3n/entor$ project.

    he Atem c"ass and the Brand c"ass sho%"d !e e+act"$ the same as in the project at the end of Chapter1F' and the$ are eas$ to imp"ement.

    6

  • 8/16/2019 Chapter 16 Projects

    7/18

    he Anventory c"ass in Chapter 1F ,as designed to #eep that program7s dri/er as simp"e as possi!"e' !%t ,ith G(3' the %ser is the Hrea"I dri/er' and $o% sho%"d !e a!"e to simp"if$ theAnventory c"ass !$ red%cing the n%m!er of o/er"oaded methods in it. he ,a$ to do this is toma#e the /indAtem method =u*lic and ca"" it in a separate step !efore ca""ing a method thataccesses an item7s data.

    ere is a s%ggested (;E c"ass diagram:

    he Anventory c"ass7s getAtem method retrie/es a reference to the most recent"$ fo%nd Atem orBrand o!ject.

    Item

    t$pe: tring%antit$: int

    price: do%!"e

    N3tem9N3tem9t$pe: tringNsetO%antit$9 %antit$: int : 3temNsetPrice9price: do%!"e : 3temNget $pe9 : tringNgetO%antit$9 : intNgetPrice9 : do%!"eN%pdate9 t$3ncrease: int : 3temN%pdate9adj%stmentMactor: do%!"e : 3tem

    Brand

    !rand: tring

    NKrand9NKrand9!rand: tring' t$pe: tringNgetKrand9 : tring

    in/entor$: Arra$Eist Arra$Eist9categor$: tringitem: 3tem n%""

    N3n/entor$9categor$: tringNget3tem9 : 3temNne,3tem9t$pe: tring' %antit$: int' price: do%!"e : /oid

    Nne,3tem9!rand: tring' t$pe: tring' %antit$: int' price: do%!"e : /oidNsetO%antit$9 %antit$: int : /oidNsetPrice9price: do%!"e : /oidNgetO%antit$9 : intNgetPrice9 : do%!"eN%pdate9 t$3ncrease: int : /oidN%pdate9adj%stmentMactor: do%!"e : /oidNfind3tem9t$pe: tring' ,arning3fMo%nd: !oo"ean : !oo"eanNfind3tem9!rand: tring' t$pe: tring' ,arning3fMo%nd: !oo"ean : !oo"eanNstoc#0eport9 : /oid

    Inventory

    Q

  • 8/16/2019 Chapter 16 Projects

    8/18

    3n the t,o newAtem methods' start ,ith a ca"" to the /indAtem method ,ith the second arg%menttrue . 3f this ret%rns /alse ' add a ne, item or ne, !randed item to the in/entor$. ;a#e the code tight

    !$ chaining the set uantity and set>rice method ca""s after an anon$mo%s new Atem or newBrand instantiation in the add arg%ment.

    3n the set uantity ' set>rice ' and u=date methods' if the c%rrent item is not null ' change the%antit$ or the price for the c%rrent item. 3n the get uantity and get>rice methods' if the c%rrent

    item is not null ' get the %antit$ or the price for the c%rrent item. 3f the c%rrent item is null in theget uantity or get>rice method' ret%rn ' 1 and Dou*le."a" ' respecti/e"$.

    3n the /indAtem methods' initia"i e itemsFound at ). hen' "oop thro%gh the entire inventory 'and ,hene/er there is a match !et,een the specified t$pe or the specified !rand and specified t$pe'assign a reference to the matching item to the item instance /aria!"e' and increment itemsFound . 3nthe three parameter /indAtem method' to a/oid a compi"e time error sa$ing cannot find RgetKrand9 ' $o%7"" ha/e to ma#e the comparison ,ith something "i#e this:

    item - (Atem) inventory.get(i);

    i/ (item instanceo/ Brand ty=e.eEuals(((Brand) item).get#y=e()) *rand.eEuals(((Brand) item).getBrand()))

    After the "oop' %se the JH=tion>ane.show essageDialog method to disp"a$ diagnostic errormessages in interacti/e G(3 !o+es. 3f itemsFound is ero and warningA/Found is /alse 'disp"a$ a cannot find error message. 3f itemsFound is not ero and warningA/Found is true 'disp"a$ an a"read$ e+ists error message. 3n the t,o parameter method' if itemsFound S 1' disp"a$ a

    fo%nd more than one !rand message' and reset the item reference to null . 3n either method' if e+act"$one match ,as fo%nd' ret%rn true . @ther,ise' ret%rn /alse .

    3n the stocI$e=ort method' %se the =rint/ method to prod%ce this format:

    0 type ' in stocIK 0 quantity % =riceK 0 price using #.## ... 0 brand 0 type ' in stocIK 0 quantity % =riceK 0 price using #.## ... 0 type ' in stocIK 0 quantity % =riceK 0 price using #.## #otal valueK 0 total value using #.##

    o get and disp"a$ the !rand name from instances of the Brand c"ass' $o%7"" ha/e to inc"%de something"i#e this:

    i/ (item instanceo/ Brand) 2 System.out.=rint(((Brand) item).getBrand() 1 M M); 9

    3nstead of ,riting a con/entiona" dri/er' ,rite a c"ass ca""ed GroceryGUA ' "i#e that specified in thefo""o,ing (E; c"ass diagram. his diagram sho,s that GroceryGUA e+tends the ?a/a AP3 JFrame c"ass' and it contains in inner c"ass ca""ed Listener ' ,hich e+tends the ?a/a AP3 :ctionListener

    >

  • 8/16/2019 Chapter 16 Projects

    9/18

    c"ass. he so"id arro, on the inner c"ass re"ationship "ine indicates a more intimate connection that theho""o, arro, on the inheritance re"ationship "ine.

    he instance /aria!"es in the GroceryGUA c"ass specif$ the components in the JFrame ,indo,. 3n thecreate om=onents method' set the "a$o%t to a FlowLayout ' and add JLa*el 7s'

    J#e8tField 7s' and JButton 7s to generate the fo""o,ing disp"a$:

    43D : int 5))3G : int 16)

    store: 3n/entor$!rand: ? e+tMie"d912t$pe: ? e+tMie"d912ne,3tem: ?K%tton9 e, 3temsho,Ta"%es: ?K%tton9 0efresh Disp"a$

    %antit$: ? e+tMie"d92price: ? e+tMie"d9-%ant3ncr: ? e+tMie"d92

    price3ncr: ? e+tMie"d9Fprint: ?K%tton9 Print @%t C%rrent 3n/entor$

    NGrocer$G(39NGrocer$G(39store: 3n/entor$

    createContents9 : /oidrefresh9fo%nd: !oo"ean : /oid

    Nmain9args: tring[] : /oid

    GroceryGUI

    JFrame

    ActionListener

    NactionPerformed9e: Action /ent : /oid

    Listener

    inner c"ass

    8

  • 8/16/2019 Chapter 16 Projects

    10/18

    Add an action "istener to a"" of the J#e8tField 7s and a"" of the JButton 7s' e+cept the !rand and t$peJ#e8tFields .

    3n the inner c"ass7s action>er/ormed method' start !$ dec"aring and retrie/ing primiti/e /a"%es forthe c%rrent item7s t$pe' !rand' %antit$' price' %antit$ increase' and price increase' and initia"i e a fo%nd/aria!"e to /alse . hen' %se the :ction!vent getSource method to disting%ish the /ario%sactions. 3f the %ser c"ic#s the e, 3tem !%tton' ca"" either the t,o or three parameter newAtem method in the Anventory c"ass to add a ne, item to the "ist' %sing ,hate/er is in the first fo%r te+t

    !o+es. 3f the %ser c"ic#s the Print @%t C%rrent 3n/entor$ !%tton' print a stoc# report. @ther,ise' ca"" theappropriate /indAtem method to assign a c%rrent reference to the item instance /aria!"e. 3f e+act"$one item is fo%nd' respond to the %ser pressing enter in the Euantity ' =rice ' EuantAncr ' and=riceAncr te+t !o+es !$ setting or %pdating as appropriate. 3f the 0efresh Disp"a$ !%tton is c"ic#ed'

    !"an# o%t the te+t in the EuantAncr and =riceAncr te+t !o+es. hen' for an$ of these fi/e "atteractions' ca"" the re/resh method.

    3n the re/resh method' if the pre/io%s /indAtem ca""s s%ccessf%""$ fo%nd e+act"$ one item' set theEuantity and =rice te+t !o+ /a"%es to sho, the res%"ts of the action performed. (se theString./ormat method to disp"a$ e+act"$ t,o decima" p"aces in the =rice fie"d. 3f the find itemca"" ,as not s%ccessf%"' !"an# the Euantity ' =rice ' EuantAncr ' and =riceAncr te+t !o+es to%nc"%tter the disp"a$.

    3n the main method' a"" $o% ha/e to do is create an instance of store' and pass it as an arg%ment to theGroceryGUA constr%ctor.

    o e+ercise the program' interact ,ith the graphica" %ser interface components to imp"ement these %ence of operations %sed to test the grocer$ store 3n/entor$ program in the project in Chapter 1F. hatis' do the fo""o,ing:

    Add a ne, item 9 !read ' 15' 8.88 . Add a ne, item 9 %nn$Da"e ' mi"# ' 2' 2.)) . Add a ne, item 9 eggs ' F' 1.5) .

    Add a ne, item 9 !read ' 2' 1.25 . UU ,arning: in stoc#

    Print a stoc# report.

    (pdate 9 %nn$Da"e ' mi"# ' 25 . UU raise price 25V (pdate 9 eggs ' ' 1 . UU "o,er %antit$ !$ 1 (pdate 9 !eer ' F . UU ,arning: not stoc#ed Add a ne, item 9 Kroo# ide ' mi"# ' -' 1.85 .

    1)

  • 8/16/2019 Chapter 16 Projects

    11/18

    Print a stoc# report et price 9 ig%anas ' 88 . UU ,arning: not stoc#ed et %antit$ 9 %nn$Da"e ' mi"# ' F . et price 9 eggs ' 2.)) . Disp"a$ c%rrent /a"%es for Kroo#0idge mi"# . UU not stoc#ed Disp"a$ c%rrent /a"%es for mi"# . UU am!ig%it$ Disp"a$ c%rrent /a"%es for eggs .

    4. [after §16.15] 4ord @rder Game **:

    Create a simp"e comp%ter game that pro/ides #ids ,ith ,ord ordering practice. &o%r program sho%"ddisp"a$ a "ist of ,ords and t,o te+t !o+es. he %ser t$pes t,o of the ,ords into the t,o te+t !o+esand then presses a Submit !%tton. he program ma#es s%re that the ,ords come from the ,ord "istand are ordered in correct dictionar$ order. ere is ,hat the disp"a$ sho%"d "oo# "i#e after the %serenters the ,ords Hm$I and H ooI:

    3f the %ser no, c"ic#s the Clear !%tton' the t,o ,ords in the te+t !o+es sho%"d disappear' and the %ser sho%"d !e a!"e to repeat the e+ercise. otice the H&o% are correctJI message on the "ast ro,. 3nitia""$'there sho%"d !e nothing in this "ocation. 3f the %ser does not fo""o, the instr%ctions' differentmessages sho%"d appear ,here the H&o% are correctJI is sho,n:

    • 3f there is nothing in either of the t,o te+t !o+es' print: !nter words in *oth *o8es.

    11

  • 8/16/2019 Chapter 16 Projects

    12/18

    • 3f neither of the t,o entered ,ords is in the "ist' print: "either entry is in the word list.

    • 3f the first ,ord is not in the "ist' print: First entry not in word list N checI s=elling.

    • 3f the second ,ord is not in the "ist' print: Second entry not in word list N checI s=elling.

    • 3f !oth ,ords are from the "ist !%t are the same' print: ou entered the same words. #ry again.

    • 3f !oth ,ords are from the "ist' !%t are in the ,rong order' print: ?rong. #ry again.

    tore the ,ord "ist sho,n in the disp"a$ in an arra$' so that it is eas$ to chec# ,hether an entered

    ,ord is from the "ist. (se a FlowLayout for the comp"ete ,indo,' and add JLa*el s' JButton s'and J#e8tField s in the indicated order.

    tore the HM%n 4ith 4ordsI te+t in a JLa*el component named heading . (se this code fragmentto gi/e heading the indicated font si e and dimensions:

    heading.setFont(heading.getFont().deriveFont( O/));heading.set>re/erredSiCe( new Dimension(?AD#@% P @!AG@#));

    he set>re/erredSiCe method comes from the J om=onent c"ass. A"" components inherit it.&o% can %se it ,ith the ?AD#@ and @!AG@# constants 9or s%ita!"e m%"tip"es of those constants toforce the se %entia""$ added components to fi"" either a comp"ete ro, or an appropriate fraction of aro, and ha/e adj%sta!"e heights.

    ere is a s%ggested (;E c"ass diagram:

    12

  • 8/16/2019 Chapter 16 Projects

    13/18

    9 he dotted re"ationship arro, indicates that the ?ordHrder c"ass im=lements the:ctionListener interface.

    5. [after §16.16] Airp"ane eat 0eser/ations **:

    a) Kasic capa!i"it$:

    &o%r friend ne#a from the Cari!!ean has as#ed $o% to ,rite a program that assigns seats on her3s"and Air"ines f"eet of airp"anes. ach airp"ane seats 12 passengers. ach ro, has t,o seats'

    ,ith an ais"e !et,een them. @dd n%m!ered seats are on the right 9star!oard side of the airp"ane./en n%m!ered seats are on the "eft 9port side of the airp"ane.

    3nitia"i e $o%r program so that > passengers are assigned seats as fo""o,s:

    Seat >assengerollins

    nullQ Faivre

    innard5 nullO nullR organs6 $ohan

    Shatrov

    WordOrderF n

    43D : int 5))3G : int 15

    W3P: tring ,ords: tring[] X"ist sho,n in samp"e disp"a$Sheading: ?Ea!e"instr: ?Ea!e"[],ordEa!e"s: ?Ea!e"[]first: ? e+tMie"dgoesKefore: ?Ea!e"second: ? e+tMie"ds%!mit: ?K%ttonc"ear: ?K%tton

    response: ?Ea!e"

    N4ord@rder9NactionPerformed9e: Action /ent : /oid

    inEist9,ord: tring : !oo"ean!"an#Eine9 : ?Ea!e"

    Nmain9args: tring[] : /oid

    JFrame ActionListener

    1F

  • 8/16/2019 Chapter 16 Projects

    14/18

    & Swordnull#ucIness

    &o%r program sho%"d print the a!o/e ta!"e' inc"%ding the H eatI and HPassengerI co"%mnheadings' at the start of $o%r program and after each ne, passenger is assigned a seat. &o% sho%"d

    print the passenger ta!"e in an ordinar$ te+t !ased conso"e. ote ho, Hn%""I is printed ne+t to seatn%m!ers that are c%rrent"$ a/ai"a!"e.

    3n addition to printing the passenger ta!"e in a te+t !ased conso"e' $o%r program sho%"d a"sodisp"a$ a G(3 ,indo, that a""o,s the %ser to choose a/ai"a!"e seats for ne, passengers. he G(3,indo, sho%"d initia""$ "oo# "i#e this:

    otice that seat n%m!ers 2' 5' 6' and 11 are green' indicating that the$ are a/ai"a!"e. 3f the %serc"ic#s an$ of the !"ac# n%m!ers' nothing sho%"d happen. 3n other ,ords' there sho%"d !e no"isteners for an$ of the !"ac# n%m!ered seat !%ttons. K%t if the %ser c"ic#s one of the greenn%m!ered !%ttons' "i#e the !%tton for seat n%m!er 6' the screen sho%"d change to this:

    1-

  • 8/16/2019 Chapter 16 Projects

    15/18

    At this point' the %ser sho%"d !e a!"e to change his or her mind' and c"ic# on an$ other a/ai"a!"eseat !%tton. 4hen satisfied' the %ser is s%pposed to enter his or her "ast name in the te+t !o+ thatappears after Enter Name: ' and ,hen the %ser presses nter' passenger seat assignmentconfirmation occ%rs. &o%r ,indo, sho%"d then "oo# "i#e this:

    As part of the confirmation process' $o%r program sho%"d:• (pdate the name !o+' so that it !ecomes non edita!"e 9as indicated !$ its gra$ co"or' a!o/e .• Disp"a$ the se"ected seat n%m!er in the non edita!"e te+t !o+ !et,een the Seat Number and

    Confrmed "a!e"s.• Disp"a$ a !"ac# "a!e" for the !%tton associated ,ith the confirmed seat.• 0emo/e the "istener for the !%tton associated ,ith the confirmed seat. o do that' ha/e the !%tton

    component ca"" remove:ctionListener( ) .• 3n the conso"e' print an %pdated /ersion of the passenger ta!"e. 4ith the a!o/e e+amp"e' the

    %pdated ta!"e sho%"d print Ea!ito#o after seat n%m!er 6.he %ser sho%"d !e a!"e to proceed to se"ect one of the remaining a/ai"a!"e seats and enter

    another name to ma#e another reser/ation' and so on' %nti" a"" the seats are fi""ed.

    he !est ,a$ to imp"ement this program7s component "a$o%t ,o%"d !e to %se nested "a$o%tmanagers. ince nested "a$o%t managers aren7t presented %nti" the ne+t chapter' ,e s%ggest that$o% fo""o, these g%ide"ines as a ,or#aro%nd:

    1. (se a ,indo, 43D /a"%e of F2). hat sho%"d ca%se the seat !%ttons to disp"a$ 6 per ro,.Depending on $o%r set%p' $o% might ha/e to t,ea# $o%r 43D /a"%e according"$.

    2. Eengthen the Select available prompt "a!e" to pre/ent the first seat !%tton from disp"a$ing inthe top right corner. o "engthen the "a!e"' %se this:

    .set>re/erredSiCe(new Dimension(?AD#@' &% &));

    4here is to !e rep"aced !$ $o%r JLa*el reference /aria!"e.

    F. o pre/ent the %ser from resi ing the ,indo,' ha/e $o%r JFrame ,indo, ca""set$esiCa*le(/alse) .

    15

  • 8/16/2019 Chapter 16 Projects

    16/18

    As a",a$s' $o% m%st:• (se named constants ,hen appropriate.• Eimit $o%r %se of c"ass /aria!"es and instance /aria!"es L %se them on"$ if appropriate.• (se appropriate modifiers for $o%r methods. he modifiers ,eY/e disc%ssed are =rivate '

    =u*lic'

    static' and

    /inal.• ;imic the samp"e session precise"$. 3n partic%"ar' note the ,indo,Ys tit"e and a"" the te+t.

    b) nhancement:

    3mp"ement separate seating sections. Mirst c"ass passengers go in the first t,o ro,s in the frontsection of the airp"ane in seats n%m!ered 1 thro%gh -. Coach c"ass passengers go in the rearsection of the airp"ane in seats n%m!ered 5 thro%gh 12.

    3nitia""$' none of the 12 seat n%m!ers sho%"d appear green' e/en tho%gh seats 2' 5' 6' and 11 area/ai"a!"e 9as e+p"ained a!o/e . he ,indo, sho%"d "oo# "i#e this:

    3f the %ser tries to c"ic# on an$ of the seat !%ttons at this time' nothing sho%"d happen. he %ser iss%pposed to first c"ic# the frst class !%tton or the coach !%tton. hen' depending on ,hich ofthese t,o !%ttons is c"ic#ed' the n%m!ers of a"" c%rrent"$ a/ai"a!"e seats in that section of the

    p"ane sho%"d change to green. Mor e+amp"e' s%ppose the %ser c"ic#s the coach !%tton. hen' the,indo, sho%"d change to "oo# "i#e this:

    16

  • 8/16/2019 Chapter 16 Projects

    17/18

    otice that seat n%m!ers 5' 6' and 11 are green' indicating that the$ are a/ai"a!"e. A"so notice thatseat n%m!er 2 is not green. 3f the %ser c"ic#s the frst class !%tton' seat n%m!er 2 sho%"d t%rn

    green and a"" the other seat n%m!ers sho%"d t%rn !"ac#. 3f the %ser then c"ic#s the coach !%tton'and then the !%tton for seat n%m!er 6' the ,indo, sho%"d change to this:

    At this point' the %ser sho%"d !e a!"e to change his or her mind' and c"ic# on an$ other a/ai"a!"eseat !%tton' or c"ic# the other t$pe !%tton and se"ect one of the seats in that section instead.

    After the %ser enters a name in the name !o+ and presses nter' passenger seat assignmentconfirmation occ%rs as descri!ed ear"ier 9see a!o/e . h%s' if the %ser is presented ,ith the a!o/e

    ,indo,' se"ects seat 11' and enters hin$am!a"a in the name !o+' the ,indo, sho%"d change tothis:

    1Q

  • 8/16/2019 Chapter 16 Projects

    18/18

    1>