Ó¢ÎıÊÊÔÌâ ¡¡¡¡1. Tranlation (Mandatory) ¡¡¡¡CDMA venders have worked hard to give CDMA roaming capabilities via the de velopment of RUIM-essentially, a SIM card for CDMA handsets currently being de ployed in China for new CDMA operator China Unicom. Korean cellco KTF demonstr ated earlier this year the ability to roam between GSM and CDMA using such car ds.However,only the card containing the user¡¯s service data can roam-not the CDMA handset or the user¡¯s number (except via call forwarding). ¡¡¡¡2. Programming (Mandatory) ¡¡¡¡Linked list ¡¡¡¡a. Implement a linked list for integers,which supports the insertafter (in sert a node after a specified node) and removeafter (remove the node after a s pecified node) methods; ¡¡¡¡b. Implement a method to sort the linked list to descending order.
¡¡¡¡3. Debugging (Mandatory) ¡¡¡¡a. For each of the following recursive methods,enter Y in the answer box i f themethod terminaters (assume i=5), Otherwise enter N. ¡¡¡¡static int f(int i){ ¡¡¡¡ return f(i-1)*f(i-1); ¡¡¡¡ } ¡¡¡¡Ansewr: ¡¡¡¡static int f(int i){ ¡¡¡¡ if(i==0){return 1;} ¡¡¡¡ else {return f(i-1)*f(i-1);} ¡¡¡¡ } ¡¡¡¡Ansewr: ¡¡¡¡static int f(int i){ ¡¡¡¡ if(i==0){return 1;} ¡¡¡¡ else {return f(i-1)*f(i-2);} ¡¡¡¡ } ¡¡¡¡Ansewr: ¡¡¡¡b. There are two errors in the following JAVA program: ¡¡¡¡static void g(int i){ ¡¡¡¡ if(i==1){return;} ¡¡¡¡ if(i%2==0){g(i/2);return;} ¡¡¡¡ else {g(3*i);return;} ¡¡¡¡ } ¡¡¡¡please correct them to make sure we can get the printed-out result as belo w: ¡¡¡¡3 10 5 16 8 4 2 1 ÖÐÎıÊÊÔÌâ ¡¡¡¡1£®ººÒëÓ¢ ¡¡¡¡±±µçÍøÂçµÄ¿ª·¢Õ߼ƻ®Ê¹À´×ÔÓÚ²»Í¬×éÖ¯µÄ¿ª·¢Õߣ¬Äܹ»ÔÚ±±µçÍøÂçµÄƽ̨ÉÏ¿ª·¢Ô² ÂúµÄ²¹³äÒµÎñ¡£±±µçÍøÂç·ûºÏ¹¤Òµ±ê×¼µÄ¿ª·Å½Ó¿Ú£¬Îª²¹³äÒµÎñµÄ¿ªÕ¹ÒýÈëÁËÎÞÊýÉÌ»ú£¬
¿ª·¢Õ߼ƻ®Îª²»Í¬²ãÃæµÄ¿ª·¢ÕßÌṩ²»Í¬µÈ¼¶µÄ×ʸñ£¬×ʸñµÄ»®·Ö»¹¿¼Âǵ½ÒÔÏÂÒòËØ£º²¹
³äÒµÎñÓë±±µçÍøÂçƽ̨µÄ¼¯ºÏ³Ì¶È£¬¿ª·¢ÕßÍÅÌåÓë±±µçÍøÂçµÄºÏ×÷¹Øϵ£¬µÈµÈ¡£ ¡¡¡¡2£®±à³Ì(www.cppentry.com) ¡¡¡¡½«ÕûÊýת»»³É×Ö·û´®£ºvoid itoa(int,char); ¡¡¡¡ÀýÈçitoa(-123,s[])Ôòs=¡°-123¡±;
U2ºÏ³ªÍÅÔÚ17·ÖÖÓÄڵøϵ½Ñݳª»á³¡£¬Í¾ÖбØÐè¿ç¹ýÒ»×ùÇÅ£¬ËĸöÈË´ÓÇŵÄͬһ¶Ë³ö·¢£¬ ÄãµÃ°ïÖúËûÃǵ½´ïÁíÒ»¶Ë£¬ÌìÉ«ºÜ°µ£¬¶øËûÃÇÖ»ÓÐÒ»Ö»ÊÖµçͲ¡£Ò»´Îͬʱ×î¶à¿ÉÒÔÓÐÁ½ÈË Ò»Æð¹ýÇÅ£¬¶ø¹ýÇŵÄʱºò±ØÐë³ÖÓÐÊÖµçͲ£¬ËùÒԾ͵ÃÓÐÈË°ÑÊÖµçͲ´øÀ´´øÈ¥£¬À´»ØÇÅÁ½¶Ë ¡£ÊÖµçͲÊDz»ÄÜÓöªµÄ·½Ê½À´´«µÝµÄ¡£ËĸöÈ˵IJ½ÐÐËٶȸ÷²»Í¬£¬ÈôÁ½ÈËͬÐÐÔòÒÔ½ÏÂýÕß µÄËÙ¶ÈΪ׼¡£BonoÐ軨1·ÖÖÓ¹ýÇÅ£¬EdgeÐ軨2·ÖÖÓ¹ýÇÅ£¬AdamÐ軨5·ÖÖÓ¹ýÇÅ£¬LarryÐ軨 10·ÖÖÓ¹ýÇÅ¡£ËûÃÇÒªÈçºÎÔÚ17·ÖÖÓÄÚ¹ýÇÅÄØ£¿£¨Óиöͬ¼ÃµÄѧÉúдÎÄÕÂ˵Ëûµ±Ê±ÔÚ΢ÈíÃæ ÊÔʱ¾ÍÊÇÅöµ½ÁËÕâµÀÌ⣬×î¶ÌÖ»ÄÜ×ö³öÔÚ19·ÖÖÓÄÚ¹ýÇÅ£¬Î¢ÈíµÄÈ˶ÔËû½²ÕâÑùµÄ½á¹ûÒѾ ÊDz»´íµÄÁË£¡£©
¡¡¡¡Aµãµ½Bµã ¡¡¡¡1ºÍ2¹ýÈ¥ 2·ÖÖÓ 2 ¡¡¡¡2¹ýÀ´ 4·ÖÖÓ 2+2=4 ¡¡¡¡10ºÍ5¹ýÈ¥ 14·ÖÖÓ 4+10=14 ¡¡¡¡1¹ýÀ´ 15·ÖÖÓ 14+1=15 ¡¡¡¡1ºÍ2¹ýÈ¥ 17·ÖÖÓ 15+2=17
¡¡¡¡19·ÖÖÓ»¹ºÜ²»´í£¿£¿£¿£¿ |