In India One rupee notes are issued by the: (a) Reserve Bank of India (b) State Bank of India (c) President of India (d) Government of India
14 21139Post New HPP Interview Questions
You are the project manager for your company's annual Spring Fling. You've made all the plans and reserved the outdoor grounds for the appropriate day and time. You are now two days away from the big day, and the forecast is calling for light rain showers in the afternoon. You rented tents just in case this risk occurred. This is an example of which Risk Response Planning tool and technique? A. Passive acceptance B. Contingency planning C. Avoidance D. Transference
what is patent rights and copy rights
What are the factors which influence the choice of specific magnetic and electric loadings of a synchronous machine?
What is the maximum row limit in excel 2010?
the problem faced on star or delta winding connection??
what do you mean by Develop test data through sourcing (or) handcrafting techniques
why do you want to join cisco?
Is it possible to move an alphanumeric incentive to a numeric field?
What are the dis_advantages of stored procedures, triggers, indexes?
If you are executing these statements in commandobject. Select * from table1; select * from table2? How you will deal result set? 42. How do you sort a dataset.
Question 5 [15] Consider the following classes, illustrating the Strategy design pattern: import java.awt.*; abstract class Text { protected TextApplet tA; protected Text(TextApplet tApplet) { tA = tApplet; } abstract public void draw(Graphics g); } class PlainText extends Text { protected PlainText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Sans-serif", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } class CodeText extends Text { protected CodeText(TextApplet tApplet) { super(tApplet); } public void draw(Graphics g) { g.setColor(tA.getColor()); g.setFont(new Font("Monospaced", Font.PLAIN, 12)); g.drawString(tA.getText(), 20, 20); } } public class TextApplet extends java.applet.Applet { protected Text text; protected String textVal; protected Color color; public String getText() { return textVal; } public Color getColor() { return color; } public void init() { textVal = getParameter("text"); String textStyle = getParameter("style"); String textColor = getParameter("color"); if (textStyle == "code") text = new CodeText(this); else text = new PlainText(this); if (textColor == "red") color = Color.RED; else if (textColor == "blue") color = Color.BLUE; else color = Color.BLACK; } public void paint(Graphics g) { text.draw(g); 10 } } The Text class is more complicated than it should be (there is too much coupling between the Text and TextApplet classes). By getting rid of the reference to a TextApplet object in the Text class and setting the colour in the paint() method, one could turn the Text class into an interface and simplify the strategy classes considerably. 5.1 Rewrite the Text and PlainText classes to do what is described above. (6) 5.2 Explain the consequent changes that are necessary to the TextApplet class. (4) 5.3 Write an additional strategy class called FancyText (to go with your simplified strategy classes) to allow fancy text to be displayed for the value "fancy" provided for the style parameter. It should use the font Font ("Serif", Font.ITALIC, 12). (3) 5.4 Explain what changes are necessary to the TextApplet class for this. (2)
What are the different types of communications?
What is user-defined inline table-valued function?
Explain the major differences between peoplesoft versions hrms8.8 and hrms8.9? Explain with one example?
What is admin panel in website?