Posted by: Echoes February 4, 2005
Computer Problem on Democracy in Nepal--Please solve
Login in to Rate this Post:     0       ?        
For some techies, excessive politics can be boring. Here, I will try to put some of these things into a software engineer's perspective: In the following program, the control never reaches line 16 (i.e. NepaliDemocracy is never run). The goal of this exercise is to identify the problems that are causing this to happen. There are two different ways to solve the problem and get the instance of NepaliDemocray to run: A. We can either fix NepaliDemocracy, OR B. We can fix Monarch If we fix NepaliDemocracy, it wont matter whether we fix Monarch or not. The control WILL reach line 16. If we fix Monarch, it won't matter whether we fix NepaliDemocracy or not. The control WILL reach line 16. Answer the following: 1. What is the desired fix in NepaliDemocracy? (You may only change--not remove!--a statement. Hint: Very simple fix) 2. What is the desired fix in Monarch? (May require changes in more than one statement. Hint: Look at the recursive function) 3. Do you prefer fix A or B or both or none? A relatively satisfactory explanation is required on all answers. Non-programmers are also encouraged to participate. You may even be able to guess the answers without studying the program in depth! (PS: This is my way of dissent, now that explict protests maybe persecuted)
Read Full Discussion Thread for this article