1 / 5

Exercise #2 Assignment

Exercise #2 Assignment. Building Consumer, Intermediary and Provider Services in Visual Studio. Requirements. You will build 4 Services and a Client/Driver to test them Driver Client Will be a Console app which can Calculate and average of three numbers

pisces
Télécharger la présentation

Exercise #2 Assignment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Exercise #2 Assignment Building Consumer, Intermediary and Provider Services in Visual Studio

  2. Requirements • You will build 4 Services and a Client/Driver to test them • Driver Client • Will be a Console app which can • Calculate and average of three numbers • Concatenate three phrases, with proper use of commas • Two intermediate services • NumberService: can take the average of three numbers • PhraseService: can concatenate three phrases • Two Ultimate Provider Servcises • AdditionService: Can add three numbers • SpacerService: Can add white space and commas to phrases • Assignment • Draw a Service Architecture diagram (like those from Session 3’s class notes and class room examples, one circle for each service, name services and operations, show invocation of an operation by an arrow • Create the solution in Visual Studio, all software in one solution

  3. Logic for Calculate Average • Client (Ultimate Consumer) • will call NumberService’s operation Average with three arguments, each if which is an integer, which will return a floating point number which is the average of those three numbers • NumberService (Intermediary) • Will call SumThree operations of AdditionServices to sum three numbers • Will divide sum by three to get an return average

  4. Compound Phrase • A concatenation of multiple phrases • Our compound phrases will always consist of three phrases • Example • First Phrase “Red Apple is delicious” • Second Phrase “Golden Apple is sweet” • Third Phrase “Green apple is tart” • Compound Phrase with spacing and commas “Red Apple is delicious, Golden Apple is sweet, and Green Apple is tart”

  5. Logic for Phrase Service • Client (ultimate consumer) • Will call Phrase Service’s operation CompoundPhrase passing three strings which are phrases of one or more words, which will return a compound phrase with proper white space and commas • PhraseService (Intermediary) • Will call SpacerService’sAddSpacing operation with a second argument which is a string of value “first” if it is the first phrase in a compound phrase, “last” if it is the last phrase in a compoundphrase, or “middle” if it is neither a “first” or “last” phrase

More Related