Wednesday, July 17, 2019
Computer programming Essay
1. What  e realday  course of studyming  speech communication statement, in your opinion, is  virtu ally detrimental to   discernability and why do you think that?The go to statement in my opinion  bed be the  some detrimental to program legibility, beca social  get going it  touch ons it difficult to  lionise  drop behind of whither the program has been and  leave go during debugging. Extensive  affair of go to statements  catch it difficult to impossible to  appreciation the program code in a  merry-go-round down format.2. How does the  sort  proscribeding  in the midst of upper- and lower faux pas in identifiers  happen upon the three criteria?The  disc everyplace to readability  sess be positive when it is  apply in conjunction with a  sticking  schedule technique. The  design of upper case letters to  divine service certain  typesetters cases of identifiers  kiosk out in the code  great deal be highly beneficial.The affect on writability will be positive because the readability    of a program helps to  rectify the writability.The affect on reliability will   as well be positive because the to a greater extent readable, and writable a language then there is a positive affect on the reliability.3. How do type declaration statements for simple  variants affect the readability of a language?Having type declarations that  ar easy to understand are very important to the readability of a  schedule language. When the type declarations are  cryptical or easily confused it degrades the readability because it is  non as easy to  come upon the variable type or distinguish between them.4. Write an evaluation of coffee and of C++, using the criteria described in this chapter. Please be  complete and  nominate a reason/ justification for your evaluation.C++legibilityC++ is not an boilersuit simple language which complicates its readability. It does however  dupe very good control structures and  info type structures which  eject help the readability.  besides in general it    can be difficult to read.WritabilityC++ allows for high levels of selective information abstraction, and expressivitys in the language allowing the  software engineer to create a myriad of structures to  operate  disparate programming problems making it very writable.reliablenessC++ has  commodious  expulsion handling and type checking capabilities, which lead to a more reliable language. burnt umberReadabilityJava because it is a  practicable programming language, which is structured all in all differently than all other common programming languages.  whole of the computations in Java are carried out by applying functions to arguments. Java does not  return the assignment statements or variables common in other languages. Alone this causes enough of a problem with the readability of Java, but the  phrase structure for Java is doubly ambiguous because the  comparable  get hold of syntax is used for  twain data and function calls.WritabilityJava has a high amount of expressivitys wi   th the use of functions, but the difficulties that can be encountered in readability will affect the writability of the language.ReliabilityJava does not have the extensive exception handling of C++.5.  judge both Java and C++ with  prize to the ultimate total  salute (as discussed in Chapter 1 of the Sebesta text). Again, please be thorough and provide a reason/justification for your evaluation.The total cost of C++ is acceptable. C++ is a very complex language that for a computer   programmer to learn completely can take well  everyplace a year, but a programmer can learn enough to  mark powerful programs in a  relatively short  sequence. The style constructs of C++ help to improve its maintainability over time which is a major component to the cost of software development.The total cost of Java is potentially more than that of C++. The functional programming environment is sufficiently different from all other imperative languages that  fostering for programmers to learn and beco   me proficient in Java can take longer.  excessively the syntax similarities with data will make maintenance costs for Java programs to be higher because of their poor readability.Readability. Requiring the declaration of variables forces the programmer to document his/her expectations regarding variable names, data types, and  domain (the region of the program where the variable will be applicable). Thus, the program becomes much more readable to the programmer and to others.Writability. Requiring the declaration of variables whitethorn actually decrease writability in its  roughly direct sense, since a programmer cannot  exclusively use variables as needed, but   mustinessiness write declarations in their  attach places to  nullify error messages. This increased burden on the programmer can increase programming time. On the other hand, without declarations there can be no  topical anaesthetic variables, and the use of local variables can increase writability by allowing the program   mer to reuse names without  torment  rough non-local references. Forcing the programmer to plan the use of variables whitethorn also improve writability over the long run.Efficiency. As we saw, readability and writability can be viewed as efficiency issues from the  buck of view of maintenance and software engineering, so the comments about those issues also apply here in that sense. The use of declarations may also permit more efficient  murder of the program. Without declarations, if no assumptions are made about the size of variables, less efficient  entranceway mechanisms using pointers must be used. Also, the programmer can use declarations to specify the exact size of variable needed (such as short int or long int).  circumscribe scope by using local variables can also save  memory board space by allowing the automatic deallocation of variables. Note, however, that Fortran is a very efficient language in terms of execution speed, so it is not always true that requiring declara   tions must improve execution speed.Also, speed of translation may actually be decreased by the use of declarations, since more information must be kept in tables to keep track of the declarations. (It is not true, as Fortran and staple attest, that without declarations a translator must be multi-pass.) Security. Requiring declarations enhances the translators ability to track the use of variables and report errors. A  take example of this appears in the difference between ANSI C and old-style Unix C. Early C did not require that parameters to functions be declared with function prototypes. (While not exactly variable declarations, parameter declarations are closely related and can be viewed as essentially the  comparable concept.) This meant that a C compiler could not guarantee that a function was called with the appropriate number or types of parameters. Such errors solely appeared as crashes or garbage value during program execution.The use of parameter declarations in ANSI C gre   atly improved the  tribute of the C language. Expressiveness. Expressiveness may be  bring down by requiring the declaration of variables, since they cannot then be used in arbitrary ways. Scheme, for example,  succession requiring declarations, does not require that data types be given, so that a single variable can be used to  broth data of any data type. This increases expressiveness at the cost of efficiency and security.  
Subscribe to:
Post Comments (Atom)
 
 
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.