Understanding Bridge Pattern using .NET
page 4 of 13
by David Simmonds
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 46962/ 64

Scenario - Sample Code

Every hotel needs to know how satisfied its visitors are with the various services. Naturally, the overall satisfaction the visitor feels at the end of the vacation is a composite of how she felt about each of the various experiences.

Now almost every trained teacher (no I am not one, I only completed a few courses) knows about Howard Gardner who postulated that we have various types of intelligences.  He described 9 major intelligences that people have, including linguistic, mathematical, kinesthetic, interpersonal intelligence, intrapersonal intelligence and some others.  So knowing all this, we realize that people express themselves in various ways: some are visual, some are numeric and some are spatial.  We must therefore be able to give visitors a variety of expressions which translate into a rating.

However, the visitor rates the experience and we must be able to translate that rating into a standardized rating scale (which represents a standard intermediate language).  We know we have a standard rating scale if in all rating modes, the highest rating translates to a common maximum number and the lowest rating translates into a common minimum number.  There must also be an (perceptibly) even progression between minimum and maximum ratings coming out of the rating control.

Now, as far as the implementation side is concerned, that signal must be fed into a rating-renderer which gives a visually consistent rendition of the rating regardless of the evaluator used to generate the rating.  We do this by feeding the 1-to-5 rating generated by the evaluators into it.  This gives it uniformity.  The rating-renderer will convert this rating into an actual visual representation by using a graphic object to represent the rating.

UML–General

Figure 1

UML – Sample Code

Figure 2


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-18 5:26:10 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search