Exercise 5

Page 1 of 3 1, 2, 3  Next

View previous topic View next topic Go down

Exercise 5

Post  Admin on Mon Mar 07, 2011 6:35 pm

A designer described the following interface for a save operation.
The users initially see a screen with a box where they can type the file name. The screen also has 'list' button that they can use to obtain a listing of all the files in the current directory (folder). This list appears in a different window. When the user clicks the 'save' button the system presents a dialogue box to ask the user to confirm the save.




Two programmers independently coded the interface using two different window managers. Programmer A used an event-loop style of program whereas programmer B used a notifier (callback) style.

(a) Sketch out the general structure of each program.
(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.

Admin
Admin

Posts : 12
Join date : 2010-11-19

View user profile http://danvirgelratilla.topicboards.com

Back to top Go down

Exercise 5

Post  george101_2007 on Fri Mar 11, 2011 6:35 pm

George Norman Patayon

(a) Sketch out the general structure of each program.
For programmer A:


For programmer B:


(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.
- The only problem that I see is only for programmer B where it is only notifications; there would be a tendency where there would be an exception event during the notification. But this can be handled using exception handlers.

george101_2007

Posts : 5
Join date : 2011-03-11

View user profile

Back to top Go down

Re: Exercise 5

Post  abigail_duhaylungsod on Fri Mar 11, 2011 8:19 pm

a)




b)Programmer B: reduces his codes by using event-loop style it is more readable, easier to maintain and has clear and concise coding.

Programmer A: provides fine granularity in managing events but it requires more code and it can be difficult to maintain.

abigail_duhaylungsod

Posts : 5
Join date : 2011-03-10

View user profile

Back to top Go down

Exercise 5 - F. J. Elman

Post  Frenzess-Joy H. Elman on Fri Mar 11, 2011 8:42 pm

Exercise 5:

A designer described the following interface for a save operation.
The users initially see a screen with a box where they can type the file name. The screen also has 'list' button that they can use to obtain a listing of all the files in the current directory (folder). This list appears in a different window. When the user clicks the 'save' button the system presents a dialogue box to ask the user to confirm the save.

Two programmers independently coded the interface using two different window managers. Programmer A used an event-loop style of program whereas programmer B used a notifier (callback) style.

(a) Sketch out the general structure of each program.
(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.

Answer:

(a) 1.) Get Event --> Checks events from queue for event identification and Execute event handler --> Save (Confirmation) or Open List
2.) Get Event --> Process events to identify proper event handler --> Save (Confirmation) or Open List

(b) I think Programmer A used the practical coding by using the event-loop style of program, since this style has short-length of codes and can be easily managed, whereas the Programmer B used the lengthy-style of coding and is very difficult to manage and trace. There could also be problems when it comes to callback functions.


Last edited by Frenzess-Joy H. Elman on Fri Mar 11, 2011 9:03 pm; edited 1 time in total
avatar
Frenzess-Joy H. Elman

Posts : 5
Join date : 2011-03-10
Age : 25
Location : Bajada, Davao City

View user profile

Back to top Go down

Re: Exercise 5

Post  Gwapong_Tao_Edward_Baylon on Fri Mar 11, 2011 8:52 pm

a.) No comment
b.) No comment

Gwapong_Tao_Edward_Baylon

Posts : 6
Join date : 2011-03-11

View user profile

Back to top Go down

Re: Exercise 5

Post  Gwapong_Tao_Edward_Baylon on Fri Mar 11, 2011 8:53 pm

a.) No comment
b.) No comment

Gwapong_Tao_Edward_Baylon

Posts : 6
Join date : 2011-03-11

View user profile

Back to top Go down

Eric N. Papas

Post  ericpapasit on Fri Mar 11, 2011 9:12 pm

(a) Sketch out the general structure of each program.



(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.

  • If the programmers will not have error handler the program may be crushed because the user can enter invalid input.
    If the programmers will not use database technology, the entered filenames will be gone.
avatar
ericpapasit

Posts : 5
Join date : 2011-01-11

View user profile

Back to top Go down

Re: Exercise 5

Post  jonalyn sanchez on Fri Mar 11, 2011 9:56 pm

a.) (1) get an event-> handle event (list) or handle event (save) -> (if yes) open list or save
(2) get an event-> passed to callback function ->(if yes) open list or save


b.) For me it is wiser for the Programmer A to use event-loop style of program because it will automatically respond to users input and actions rather than Programmer B who uses callback style which makes the program lengthy as to calling a callback function pass indirectly from a managed application, through a DLL function, and back to the managed implementation.


Last edited by jonalyn sanchez on Fri Mar 11, 2011 10:22 pm; edited 1 time in total

jonalyn sanchez

Posts : 5
Join date : 2011-03-10

View user profile

Back to top Go down

exercise 5

Post  juvilyn consejo on Fri Mar 11, 2011 10:12 pm

a.)



b.) The possible problem would be Programmer A needs more programs or codes in order to satisfies the required process so in this sense, thus, the event-loop is at the highest level of control within the program while Programmer B is just easy to load and to use.


Last edited by juvilyn consejo on Fri Mar 11, 2011 10:32 pm; edited 2 times in total (Reason for editing : the picture is not displayed.)
avatar
juvilyn consejo

Posts : 5
Join date : 2011-01-11
Age : 26
Location : tagum city

View user profile

Back to top Go down

Re: Exercise 5

Post  Ruchan Alangilan on Fri Mar 11, 2011 10:20 pm

A designer described the following interface for a save operation.
The users initially see a screen with a box where they can type the file name. The screen also has 'list' button that they can use to obtain a listing of all the files in the current directory (folder). This list appears in a different window. When the user clicks the 'save' button the system presents a dialogue box to ask the user to confirm the save.




Two programmers independently coded the interface using two different window managers. Programmer A used an event-loop style of program whereas programmer B used a notifier (callback) style.

(a) Sketch out the general structure of each program.
(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.


Arrow i'll try to find out sir.

Ruchan Alangilan

Posts : 5
Join date : 2011-03-11

View user profile

Back to top Go down

Re: Exercise 5

Post  Ma. Monique Asuque on Fri Mar 11, 2011 10:25 pm

A. PROGRAMMER A


PROGRAMMER B



B. PROGRAMMER A – Since it uses looping it would shorten the length of the code which would be simpler and very easy to maintain, while PROGRAMMER B - used a long-length coding technique that could be hard to trace and debug when problems arise.
avatar
Ma. Monique Asuque

Posts : 5
Join date : 2011-03-09

View user profile

Back to top Go down

Re: Exercise 5

Post  Alaina Simbal on Fri Mar 11, 2011 10:54 pm

a.)
Programmer A:
get an event-> Handle event for list or handle event for save -> if yes (for the event list) open list or save (for the event save).
Programmer B:
get an event-> Process events to identify proper event handler -> Save (Confirmation) or Open List.

b.)
Programmer B used a complex style of coding that makes it more difficult to trace for errors.


Last edited by Alaina Simbal on Thu Apr 07, 2011 12:59 pm; edited 3 times in total

Alaina Simbal

Posts : 5
Join date : 2011-03-11

View user profile

Back to top Go down

Exercise 5

Post  dudzcomz on Fri Mar 11, 2011 11:13 pm

a. GetFilenameEvent------>notify----> confirm email
b. GetFilenameEvent------>notify----> confirm email

dudzcomz

Posts : 5
Join date : 2011-03-11

View user profile

Back to top Go down

Exercise 5

Post  Mary Claire P. Avila on Fri Mar 11, 2011 11:16 pm

With the help of my friends and by understanding i can arrive to these answers..

A)




B)
Programmer A used an event-loop style of coding which is easier to understand and is more brief and concise. On the other hand Programmer B used a more complex style of coding which happens to be more complicated to trace and manage.
avatar
Mary Claire P. Avila

Posts : 5
Join date : 2011-03-11
Age : 25

View user profile

Back to top Go down

Re: Exercise 5

Post  Allan Gregor Gepulla on Fri Mar 11, 2011 11:19 pm

Programmer A: always loop until it found something like an event. It causes more runtime resources
https://docs.google.com/leaf?id=0B6U1UbM5LRx_ZDY2M2UxNTYtYjIxNy00MjMyLTlhN2ItZThmMzM2OGM0MGVm&hl=en&authkey=COOQ93A

Programmer B: it waits for something to happen. Two synchronous event might happen and might cause runtime problems
https://docs.google.com/leaf?id=0B6U1UbM5LRx_ZTg2MTliNTItMDhlMi00MmYwLThkNTAtNjVlNTg5ZDBiZmM4&hl=en&authkey=CMiAgKEP


Last edited by Allan Gregor Gepulla on Sat Mar 12, 2011 9:50 am; edited 1 time in total (Reason for editing : added links for picture)

Allan Gregor Gepulla

Posts : 5
Join date : 2011-03-11

View user profile

Back to top Go down

Re: Exercise 5

Post  Cariza Joy Ensoy on Fri Mar 11, 2011 11:29 pm

a.
Programmer A: Get Event --> Checks events from queue for event identification and Execute event handler --> Save (Confirmation) or Open List
Programmer B: Get Event --> Process events to identify proper event handler --> Save (Confirmation) or Open List

b.
Programmer A used simplified coding by using the event-loop style of program where this style is coded shorter and easy to manage while Programmer B used a style that is longer to code and harder to read but has the ability to manage events better.
avatar
Cariza Joy Ensoy

Posts : 5
Join date : 2011-03-11

View user profile

Back to top Go down

Re: Exercise 5

Post  Phoebe Angelie Gallardo on Fri Mar 11, 2011 11:44 pm


(a) Sketch out the general structure of each program.





(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.

Programmer A has a high level codes used but it prone to many bugs which would come up to inconsistency where programmer B has used callback but has codes to be executed better.
avatar
Phoebe Angelie Gallardo

Posts : 5
Join date : 2011-03-08

View user profile

Back to top Go down

Exercise5

Post  April Kaye Bestre Bigonte on Fri Mar 11, 2011 11:52 pm

Charmagne Christal Billuga


http://img197.imageshack.us/i/22505891.png/



A. it's readable and concise
B. i think their might be a big problem here and it will be when the costumers may enter a wrong data then the program may be having an error
avatar
April Kaye Bestre Bigonte

Posts : 8
Join date : 2010-12-01
Age : 26
Location : Obrero, Davao City

View user profile

Back to top Go down

Exercise 5

Post  KatrinaAnirtak on Fri Mar 11, 2011 11:54 pm

(a) Sketch out the general structure of each program.
(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.

KatrinaAnirtak

Posts : 5
Join date : 2011-03-11

View user profile

Back to top Go down

Re: Exercise 5

Post  Mhel Sheryll Jala on Fri Mar 11, 2011 11:58 pm

a.)

Programmer A: Get Event --> Checks events from queue for event identification and Execute event handler --> Save (Confirmation) or Open List

Programmer B: Get Event --> Process events to identify proper event handler --> Save (Confirmation) or Open List

b.)

Programmer A: uses the event-loop style which is very easy to manage and understand and this styles has short-length of codes.

Programmer B:uses the long-length coding which is hard to trace and manage.
avatar
Mhel Sheryll Jala

Posts : 5
Join date : 2011-03-08
Age : 24

View user profile

Back to top Go down

EXERCISE 5

Post  Jevelyn C. Labor on Fri Mar 11, 2011 11:58 pm

avatar
Jevelyn C. Labor

Posts : 5
Join date : 2011-03-10

View user profile

Back to top Go down

Exercise 5

Post  Marybert V. Lee on Fri Mar 11, 2011 11:58 pm

5. A designer described the following interface for a save operation.
The users initially see a screen with a box where they can type the file name. The screen also has 'list' button that they can use to obtain a listing of all the files in the current directory (folder). This list appears in a different window. When the user clicks the 'save' button the system presents a dialogue box to ask the user to confirm the save.
Two programmers independently coded the interface using two different window managers. Programmer A used an event-loop style of program whereas programmer B used a notifier (callback) style.

(a) Sketch out the general structure of each program.
(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.




a.) programmer A


http://img858.imageshack.us/i/programmera.jpg/
When an event occurs, the event loop takes care of dispatching that event to the relevant code in order to handle the event. While there may be some layers of library / framework between your application code and the low-level event handler, ultimately it’ll usually be some part of your application code that gets invoked in response to the event.



Programmer B


http://img25.imageshack.us/i/programmerb.jpg/

b. Programmer A uses a better kind of programming algorithm using event loops since it is easier to do and understand "for me". Event Loop provides more detailed, fine grained approach because it read events from an event queue, interpret an "event control string" to identify the event needed and it provides ability to run event handler. On the other hand, programmer B using a callback style uses the more composite one but Callbacks provide structured environment since it can build a table linking event with event handlers. Callbacks simplified the even processing.







Last edited by Marybert V. Lee on Sat Mar 12, 2011 12:28 am; edited 2 times in total (Reason for editing : unable to see image)
avatar
Marybert V. Lee

Posts : 5
Join date : 2011-03-08
Age : 25

View user profile http://akosimariaberta.blogspot.com/

Back to top Go down

Re: Exercise 5

Post  jennifer conta on Sat Mar 12, 2011 12:08 am

A designer described the following interface for a save operation. The users initially see a screen with a box where they can type the file name. The screen also has 'list' button that they can use to obtain a listing of all the files in the current directory (folder). This list appears in a different window. When the user clicks the 'save' button the system presents a dialogue box to ask the user to confirm the save.
avatar
jennifer conta

Posts : 5
Join date : 2011-03-09
Age : 26
Location : Davao City

View user profile

Back to top Go down

Re: Exercise 5

Post  Jovanne Nick L. Cacayan on Sat Mar 12, 2011 12:16 am

(a) Sketch out the general structure of each program.
PROGRAMMER A


PROGRAMMER B


(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.

ANSWER:
Both styles of the two programmers may encounter the delayed processing problem if there are other events in the queue before them.Either one could pull the event off the event queue and block the operation of the other.

Jovanne Nick L. Cacayan

Posts : 5
Join date : 2011-03-10

View user profile

Back to top Go down

Re: Exercise 5

Post  willypedroso on Sat Mar 12, 2011 2:20 am

(a) Sketch out the general structure of each program.




(b) Highlight any potential interface problems you expect from each programmer and how they could attempt to correct them.


Last edited by willypedroso on Tue Mar 15, 2011 1:53 am; edited 1 time in total
avatar
willypedroso

Posts : 5
Join date : 2011-03-12
Age : 26

View user profile

Back to top Go down

Re: Exercise 5

Post  Sponsored content


Sponsored content


Back to top Go down

Page 1 of 3 1, 2, 3  Next

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum