Question

In: Computer Science

Ex : Each of the following questions is about event processing. Mark T if the question...

Ex : Each of the following questions is about event processing. Mark T if the question is valid, otherwise F.
(1) Subclasses of EventObject on components handle special types of events such as action, window, component, mouse, and key events ( )
(2) Source objects activate events, event-related objects handle events, and event-related objects are called risers ( )
(3) For all event types, the riser interface is usually named XListener for Xevent (except for MouseMotionListener) ( )
(4) e.getSource() may be used to determine if the source object is a button, check box, or radio button ( )
(5) Since the riser class is not shared by other applications, it is appropriate to be defined inside the frame as an internal class ( )
(6) Since all methods within the riser interface are abstract and require implementation of all methods, classes called adapters are provided for convenience ( )

Please solve the problem. and Please Let me explain the process.

Thank you:)

Solutions

Expert Solution

(1) Subclasses of EventObject on components handle special types of events such as action, window, component, mouse, and key events (True )

Explanation: In java AWT Event classes,the subclasses on Eventobject handles various special types pf events such as

1.Action events

2.Adjustment event

3.Component event

4.Container event

5.Focus event

6.Input event

7.Item event

8.Key event

9.Mouse event

10.Text event

11.Windows event

So Hence the above condition is true


(2) Source objects activate events, event-related objects handle events, and event-related objects are called risers (False )

Expanation:Source objects activate events,event related objects handle events.these event related objects are called as listeners not risers,these listeners are responsible for generating response to an event.

3) For all event types, the riser interface is usually named XListener for Xevent (except for MouseMotionListener) (False)

Explanation:First of all there is no any interface called as risers in Event handling


(4) e.getSource() may be used to determine if the source object is a button, check box, or radio button ( True)

Explanation:getsource() method in java is used to determine which component outsourced the event such as button,check box or radio button.


(5) Since the riser class is not shared by other applications, it is appropriate to be defined inside the frame as an internal class (False )

Explanation: There is no any class called as riser class in java,


(6) Since all methods within the riser interface are abstract and require implementation of all methods, classes called adapters are provided for convenience (False )

Explanation:There is no any interface in the java called as risers.


Related Solutions

Question 3 For each of the following, explain the impact of each event on the aggregate...
Question 3 For each of the following, explain the impact of each event on the aggregate demand (AD), short run aggregate supply (SRAS) and long run aggregate supply (LRAS) of Malaysia: (i)        It is announced that Malaysia has just entered into a recession. (ii)       The price of petroleum decreases by another 60%. Political and social unrest in Indonesia have caused many foreign firms to relocate their business to Malaysia. (3marks) (i)State the endogenous and exogenous factors of economic growth. (ii)      ...
With the following questions mark whether each is non-reasoning or reasoning. If "reasoning," then:
With the following questions mark whether each is non-reasoning or reasoning. If "reasoning," then:1. Circle indicator words and/or phrases2. Mark off and number the statements3. Paraphrase and list the statements4. Identify the main conclusionThe World Bank has recently estimated the number of people in absolute poverty in the Third World at around 780 million. Half of them are in South Asia. The other half lives in East Asia, sub-Saharan Africa, Latin America, North Africa and the Middle East. Roughly 80...
A psychology quiz consists of ten multiple choice questions (each question is of worth 1 mark)...
A psychology quiz consists of ten multiple choice questions (each question is of worth 1 mark) with 5 options per question. A student knows the correct answer to 5 of the questions, can rule out 1 option in 3 questions, can rule out 2 options in 1 question, can not rule out any options in 1 question. What are the expected marks that the student would get?
For each of the following questions carefully define (1) the sample space and (2) the event...
For each of the following questions carefully define (1) the sample space and (2) the event under consideration. Then (3) determine the probability. For full credit, you will have to display these three parts. We are given six cards: Two of the cards are black and they are numbered 1, 2; and the other four cards are red and they are numbered 1, 2, 3, 4. We pick two cards at the same time. What is the probability that both...
Answer all ten (10) questions on the multiple choice test. Each question is worth one mark....
Answer all ten (10) questions on the multiple choice test. Each question is worth one mark. QUESTION 1 Which is not a strategy used by governments to attract MNCs: favourable tax treatment tariff protection foreign exchange privileges limits on the repatriation of profits, dividends and royalties Answer: _____ QUESTION 2 Dumping is the selling of goods: At below their production costs In a foreign market for less than their cost (c)        Both a and b above At higher than market...
Question (1) Answer each of the following questions briefly. These questions are based on the following...
Question (1) Answer each of the following questions briefly. These questions are based on the following relational schema: Emp(eid: integer, ename: string, age: integer, salary: real) Works(eid: integer, did: integer, pcttime: integer) Dept(did: integer, dname: string, budget: real, managerid: integer) (a) (5 points) Give an example of a foreign key constraint that involves the Dept relation. What are the options for enforcing this constraint when a user attempts to delete a Dept tuple? (b) (5 points) Write the SQL statements...
Read the case and answer the following questions.                                  30 Mark
Read the case and answer the following questions.                                  30 Marks                                Richard Dana Associates (RDA) was brought in by the owners of a family-owned business with complex relationship issues at a time preceding an anticipated leadership transition. Following individual and group coaching sessions, RDA was able to help the leadership separate personal issues, and codify practices through formal policies to allow the leadership group to focus on business issues without personal complications. At the end of RDA's engagement, the client was...
1. a) Mark each sentence as (T)rue or (F)alse - ( ) If enthalpy change for...
1. a) Mark each sentence as (T)rue or (F)alse - ( ) If enthalpy change for a reaction is zero, then ∆G° equals to zero. - ( ) If ∆G° is negative, reactants are favored. - ( ) If a reaction has a high negative ∆G° it will proceed faster than a reaction which has a lower negative ∆G°   (like – 90 kJ ∆G° reaction faster than -30 ∆G° reaction). - ( ) When change in enthalpy is positive (endothermic...
Question 2: Applications of finance (20 Mark) Please answer the following questions. Show all your workings...
Question 2: Applications of finance (20 Mark) Please answer the following questions. Show all your workings when calculations are required and round off your FINAL result to TWO decimal places. You are offered two options by the Waverley Toyota dealer for purchasing a Toyota Landcruiser 4WD. Option 1: Upfront where you pay $100,000 now. Option 2: 2- year monthly payment plan of $4500/month, starting today, with a final payment to be made 23 months from today. a) If the market...
Consider the following questions and a student's response to each question (shown in italics). In each...
Consider the following questions and a student's response to each question (shown in italics). In each case, determine if the student's answer is true or false. Explain the reasons that the distance curve has the shape it does. The distance curve is an increasing curved line because the object is accelerating. TrueFalse     The velocity curve is an increasing straight line. What does this mean? The velocity curve is a straight line because the object is moving with constant speed. TrueFalse    ...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT