Exercise 2 assignment
This presentation is the property of its rightful owner.
Sponsored Links
1 / 5

Exercise #2 Assignment PowerPoint PPT Presentation


  • 47 Views
  • Uploaded on
  • Presentation posted in: General

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

Download Presentation

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Exercise 2 assignment

Exercise #2 Assignment

Building Consumer, Intermediary and Provider Services in Visual Studio


Requirements

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


Logic for calculate average

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


Compound phrase

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”


Logic for phrase service

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


  • Login