.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Interview Question >> Patten/Practices >> Post New Question Subscribe to Interview Questions

You are having a printer class which the user has to call the following methods to get printing done
- OpenToner()
- CheckColor()
- IsColorValid()
- SetMargin()
- DoPrint()

Which design pattern you prefer for the above scenario?
-

Posted By :Jean Paul     Posted Date :February 24, 2011    Points :15   Category :Patten/Practices 
Facade

You can also find related Interview Question to You are having a printer class which the user has to call the following methods to get printing done - OpenToner() - CheckColor() - IsColorValid() - SetMargin() - DoPrint() Which design pattern you prefer for the above scenario? -  below: 

Real software is developing a speech-based user interface for blind people. However, speech based interface are difficult to design and time given by the client is short. To develop a functional interface without any errors, the company wants to first evaluate the prototype. They used the storyboard technique to demonstrate the functionality of the application. However, this technique was unable to demonstrate the interactive feature of the application. Analyze and provide solution for the above scenario?

  
1, The design team of Real software should have used the Sketching technique because storyboard technique would only provide the flow and features of the interface.

2, The design team of Real software should have used the Horizontal Prototyping because storyboard technique would only provide the flow of the interface.

3, The design team of Real software should have used the Wizard of Oz technique because storyboard technique would only provide the flow and features of the interface

4, The design team of Real software should have used the Vertical Prototyping because storyboard technique would only provide the flow of the interface.


Answer : 3 (More...)

Can we call a base class method without creating instance?

  
Its possible If its a static method.

Its possible by inheriting from that class also.

Its possible from derived classes using base keyword. (More...)

Which design pattern should have private or protected constructor?

  
singleton design pattern should have private or protected constructor (More...)

Which class of the WPF is the base class of all the user-interactive elements?

  
Control class is the base class of all the user-interactive elements in WPF. (More...)

Which of the following methods is used to collect and interpret data from end users to design an application. ?

  
1, Coherence
2, Contextual design
3, Participatory design
4, Ethnography

Answer : 2 (More...)

Which of the following methods is used to collect and interpret data from end users to design an application?

  
1, Coherence
2, Contextual design
3, Participatory design
4, Ethnography

Answer : 1
(More...)

You are designing a single person shooter game application. The player can choose between multiple guns.
1) Pistol with 5 bullets
2) Shotgun with 100 bullets
3) Grenade Launcher with 20 grenades

Each gun will have different sound effects and graphics.

Pressing Ctrl+Space should rotate between guns.
Which design pattern should you employ for this?

  
Use Strategy Pattern.

Explanation: Each gun having different performance and graphics.
So this can be accomodated in the algorithm.

Strategy pattern is best suited for shifting the guns/algorithms

There will be a IGun interface implemented by 3 classes
Pistol : IGun
Shotgun : IGun
GrenadeLauncher : IGun (More...)

Why struct is not used to hold entity instead of class?

(eventhough struct provides us properties, methods and interface support)

  
Struct is a value type and
Class is a reference type.

Struct is stored in Stack - so if you pass a struct as argument to method - a new struct will be created on stack and values will be copied - this is a time consumingp process in the order of n.

Class is stored in Heap - so the same reference can be passed to various methods without duplication. (More...)

What is design pattern?

  
Design pattern are recurring solution to the recurring problem.

There are basically classified in to three categories. They are,
1. Creational pattern
2. Structural pattern
3. Behavioural pattern.
(More...)

Which design pattern to use if i needed to add additional responsibilities at runtime?

  
Decorator Pattern design pattern is use if i needed to add additional responsibilities at runtime (More...)

Quick Links For Interview Questions Categories:
ASP.Net Windows Application   .NET Framework   C#   VB.Net   ADO.Net  
Sql Server   SharePoint   Silverlight   OOPs   JQuery   JavaScript/VBScript
Biztalk Patten/Practices .IIS WCF WPF WWF
Networking Aptitude Others   All      

Find questions, FAQ's and their answers related to .NET, C#, Vb.Net, Sql Server and many more.

 
Now you can find lots of .NET, C#, Vb.Net, SQL Server,Windows, ASP.Net related Questions and their Answers here at www.dotnetspark.com. Our aim is to help you pass your certification Exams (MCP, MCSD, MCAD etc.,) with flying scores and get good name in your company.

So, Start looking our Interview Question section daily and improve your .NET Skills. You can also help others by posting Interview Questions and their Answers in this section.


Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend