QUIZ

CHAPTER 10

Your Name:


10.1 OnPaint is

(a) an event
(b) a method
(c) a graphics object
(d) a form

10.2 To enable a method called DrawMe to be called whenever a form needs to be painted, we use:

(a) this.Controls.Add(DrawMe)
(b) this.Paint += OnPaint(DrawMe);
(c) this.Paint += new PaintEventHandler(DrawMe)
(d) DrawMe.PaintEventHandler.Add()

10.3 FromFile is

(a) a static method of Image
(b) an instance method of Image
(c) a GDI+ command
(d) a graphics event


10.4 Threads are

(a) instance methods
(b) static methods
(c) events
(d) objects

10.5 ThreadStart is

(a) a method which loops till some condition is met to end the thread
(b) a delegate which keeps a register of a threadís run method
(c) an object which starts a thread running by entering its run method
(d) an event which activates the start of a thread

10.6 A statement to force a drawing in a picture box, p, to be redrawn is:

(a) p.Invalidate();
(b) p.Validate();
(c) OnPaint(p);
(d) p.ReDraw();

10.7 When we do a web request, the result is

(a) a resource accessed by the http:// protocol
(b) a web response accessed by the http:// protocol
(c) a web response accessed by any one of several protocols
(d) a URL

10.8 The protocol used for communicating between sockets is:

(a) socket protocol
(b) https://
(c) stream
(d) TCP/IP

10.9 The statement in a client server that enables the server to wait for clients to contact it is:

(a) Thread.Sleep(100);
(b) listener.AcceptSocket();
(c) listener.Start();
(d) client.Start();

10.10 If we have the ATM system with three clients, how many threads in total are running?

(a) one
(b) three
(c) four
(d) impossible to say