为什么大学生认为JAVA编程难?

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/deng707273/article/details/80409223

我发现,进入计算机专业就读的学生,最初至少有一大半对真实的软件开发根本不了解,是“一张白纸”。

不幸的是,学了四年之后,许多张“白纸”又变成了许多罐“浆糊”,带着对软件开发可能是畏惧,也可能是无所谓,但绝对不是喜欢的感触离开校园。

编程真的那么没劲?那么难和枯燥?

我写了将近二十年的代码,虽然不靠编程吃饭,但也似乎勉强可算是个老程序员,我对编程的看法可总结为两句:何以解忧,唯有编程!

我经常在想一个问题:编程其实是很有趣很好玩很实用并很有成就感的一件事,为什么会有这么多的学生觉得编程很难?

我认为这张图道出了问题的关键——学习过程中的“正向”兴趣循环是否成功地建立。

强烈的兴趣与不断获得的成就感是整个学习过程的“引擎”,它为学生完成整个学习任务提供源源不断的强大动力。有无数的事实支持这个观点。

而传统的教学观点认为,本科的主要教育目标之一是为学生在本专业领域未来的发展“打下扎实的理论与实践基础”,所以从一开始就要“严格要求”,“科学训练”。

这个观点不能说错,但我认为,我们的计算机教育,尤其是针对初学者的教育,首要的任务是引发兴趣。没有兴趣,一切免谈。

之所以很多大学生觉得编程难,其原因就是现有的计算机教学方式从一开始就给了这些学生“痛苦”的编程体验,并且在后期枯燥的专业课程学习中不断得到强化,最终使很多大学生对编程敬而远之或畏之如虎。

展开阅读全文

认为相当难的问题...

12-06

[align=left]只可以用stdio.h和string.h里的命令rn我都快疯了,一点不会....rnrnUniversal Product Code AnalysisrnrnIn this assignment you will write a C program to analyze a UPCrnBarcode. rnSee: http://en.wikipedia.org/wiki/Universal_Product_Code for details.rnThere are a variety of UPC codes. rnWe will only analyze the 12 digit variety.rnA barcode is printed on many items and is scanned in a shop for pricing andrninventory. rnIt consists of a sequence of black and white bars of differentrnwidths. rnThe widths encode a sequence of 12 digits.rnrnHere is a barcode for the UPC, 036000291452. As shown, there is a guardrnat the start, a guard in the middle, and a guard at the end.rnrn[img=http://upload.wikimedia.org/wikipedia/commons/7/7e/UPC_EANUCC-12_barcode.png][/img]rnrnA black bar can be of width 1, 2, 3 or 4 and is represented by '1', '11',rn'111' or '1111' Similarly a white bar is represented by '0', '00', '000' orrn'0000'. rnA valid barcode consists of the left guard, 101, a string of 42 '1'srnor '0's representing the left 6 digits, a middle guard, 01010, a string ofrn42' 1's or '0's representing the right 6 digits, and the right guard, 101.rnEach UPC digit is represented by 7 '1's or '0's.rn Example: If 3 occurs in thernleft 6 digits it is represented by 0111101, meaning a white bar of width 1,rna black bar of width 4, a white bar of width 1 and a black bar of width 1.rnIf 3 occurs in the right 6 digits it is represented by 1000010, (that is,rnthe "negative" of 0111101). rnYour program will input a barcode from the file,rn"barcode.dat". For the above barcode the file barcode.dat contains:rnrn10100011010111101010111100011010001101000110rn101010110110011101001100110101110010011101101100101rnrnYour program will analyze this and convert it into the UPC code,rn0 3 6 0 0 0 2 9 1 4 5 2.rnrnThe left values for all the ten digits are given by:rnrn0 = 0001101, 1 = 0011001, 2 = 0010011, 3 = 0111101, 4 = 0100011,rn5 = 0110001, 6 = 0101111, 7 = 0111011, 8 = 0110111, 9 = 0001011rnrnThese values can be represented by joining them into the string:rnrn"00011010011001001001101111010100rn01101100010101111011101101101110001011"rnrnNote that the left value corresponding to digit d starts at positionrn7*d, and has length 7.rnrnSimilarly the right values is:rnrn"1110010110011011011001000010101110rn010011101010000100010010010001110100"rnrnYour program will read a barcode consisting of 95 '0's or '1's, from thernfile, barcode.dat, rnand convert it into a 12 digit UPC. Assume thatrnthere are no errors in the barcode.rnrnYour program should use these functions:rnrnmain : read the barcode from barcode.dat, print its left and right parts,rn call analyze, and print the resulting UPC digits.rnrnvoid analyze(char barcode[ ], int upc[ ]): analyze the barcode given byrnthe first parameter and convert into 12 digits,rn in the second parameter.rnCalls convert.rnrnint convert(char barcode[ ], int n, char code[ ]): convert the 7 barcoderncharacters starting at position n to a single UPC digit.rn The first parameter,rnbarcode, should match part of the third parameter, code (which will eitherrnbe a left value string, or a right value string).rn The position of thernmatch can be used to calculate the UPC digit. rnCalls match.rnrnint match (char a[ ], int aStart, char b[ ], int bStart, int n): match 'n'rncharacters of string a, rnstarting at index aStart with n characters ofrnstring b starting at index bStart. rnIf successful, return 1 elsernreturn 0.rnrnThe program should output the final UPC digits. Here is a sample output.rnrnBarcode AnalysisrnrnLeft part: 0001101 0111101 0111011 0100011 0101111 0101111rnRight part: 1110010 1001000 1000010 1110010 1011100 1110100rnrnUPC Code is: 0 3 7 4 6 6 0 8 3 0 4 9[/align] 论坛

没有更多推荐了,返回首页