Welcome to the most useless blog in the world

Welcome to the most useless blog in the world
Feel free to +1 (pretty please)

Wednesday, February 5, 2014

CHAPTER 13. Assignment from Mr. Tri Djoko Wahjono

1. How are machine languages different from assembly languages?
Two types of low-level languages are machine languages and assembly languages. Machine language, known as the first generation of programming languages, is the only language the computer directly recognizes. Machine language instructions use a series of binary digits or a combination of numbers and letters that represents binary digits. The binary digits correspond to the on and off electrical states. As you might imagine, coding in machine language is tedious and time-consuming. With an assembly language, the second generation of programming languages, a programmer writes instructions using symbolic instruction codes. Symbolic instruction codes are meaningful abbreviations. With an assembly language, a programmer writes abbreviations such as A for addition, C for compare, L for load and M for multiply. Assembly languages also use symbolic addresses. A symbolic address is a meaningful name that identifies a storage location. For example, a programmer can use the name RATE to refer to the storage location that contains a pay rate.

2. What is the purpose of procedural programming languages, and what are the features of C and COBOL?
The disadvantages of machine and assembly (low-level) languages led to the development of procedural languages in the late 1950s and 1960s. In a procedural language, the programmer writes instructions that tell the computer what to accomplish and how to do it. With a procedural language, often called a third-generation language (3GL), a programmer uses a series of English-like words to write instructions. For example, ADD stands for addition or PRINT means to print. Many 3GLs also use arithmetic operators such as * for multiplication and 1 for addition. These English-like words and arithmetic symbols simplify the program development process for the programmer. The C programming language, developed in the early 1970s by Dennis Ritchie at Bell Laboratories, originally was designed for writing system software. Today, many programs are written in C (Figure 13-6). This includes operating systems and application software such as word processing and spreadsheet programs. C is a powerful language that requires professional programming skills. Many programmers use C for business and scientific problems. C runs on almost any type of computer with any operating system, but it is used most often with the UNIX and Linux operating systems. COBOL (COmmon Business-Oriented Language) evolved out of a joint effort between the United States government, businesses, and major universities in the early 1960s (Figure 13-7). Naval officer Grace Hopper, a pioneer in computer programming, was a prime developer of COBOL. COBOL is a programming language designed for business applications. Although COBOL programs often are lengthy, their English-like statements make the code easy to read, write, and maintain. COBOL especially is useful for processing transactions, such as payroll and billing, on mainframe computers. COBOL programs also run on other types of computers.

3. What are the characteristics of object-oriented programming languages and program development tools?
Computer programmers use an object-oriented programming (OOP) language or objectoriented program development tool to implement an object-oriented design. Recall from Chapter 12 that an object is an item that can contain both data and the procedures that read or manipulate that data. An object represents a real person, place, event, or transaction. A major benefit of OOP is the ability to reuse and modify existing objects. For example, once a programmer creates an Employee object, it is available for use by any other existing or future program. Thus, programmers repeatedly reuse existing objects. For example, the payroll program and health benefits program both use the Employee object. That is, the payroll program would use it to process employee paychecks and the health benefits program would use it to process health insurance payments. Programs developed using the object-oriented approach have several advantages. The objects can be reused in many systems, are designed for repeated use, and become stable over time. In addition, programmers create applications faster because they design programs using existing objects.

4. What are the uses of other programming languages and other program development tools?
A 4GL ( fourth-generation language) is a nonprocedural language that enables users and programmers to access data in a database. With a nonprocedural language, the programmer writes English-like instructions or interacts with a graphical environment to retrieve data from files or a database. Nonprocedural languages typically are easier to use than procedural languages. Many object-oriented program development tools use 4GLs. One popular 4GL is SQL. As discussed in Chapter 10, SQL is a query language that allows users to manage, update, and retrieve data in a relational DBMS. These powerful languages allow database administrators to define a database and its structure. They also enable users to maintain and access the data in the database.

5. What are web page program development techniques such as HTML and XHTML, XML and WML, scripting languages, DHTML, Ruby on Rails, Web 2.0 Development, and web page authoring software?
HTML (Hypertext Markup Language) is a special formatting language that programmers use to format documents for display on the Web. You view a Web page written with HTML in a Web browser such as Internet Explorer, Safari, Firefox, Opera, or Google Chrome. Similarly, XHTML (extensible HTML) is a markup language that enables Web sites to be displayed more easily on microbrowsers in smart phones and other mobile devices, as well as on desktop and notebook computers. XHTML includes features of HTML and XML. XML (Extensible Markup Language) is an increasingly popular format for sharing data that allows Web developers to create customized tags, as well as use predefined tags, used for developing a single Web site whose content can be formatted to display appropriately on various devices. XML separates the Web page content from its format, allowing the Web browser to display the contents of a Web page in a form appropriate for the display device. For example, a smart phone, a PDA, and a notebook computer all could display the same XML page or use different formats or sections of the XML page. Wireless devices use a subset of XML called WML. WML (wireless markup language) allows Web developers to design pages specifically for microbrowsers. Many smart phones and other mobile devices use WML as their markup language. Programmers write scripts, applets, servlets, or ActiveX controls using a variety of languages. These include some of the languages previously discussed, such as Java, C++, C#, F#, and Visual Basic. Some programmers use scripting languages. A scripting language is an interpreted language that typically is easy to learn and use. Popular scripting languages include JavaScript, Perl, PHP, Rexx, Tcl, and VBScript. Dynamic HTML (DHTML) is a type of HTML that allows Web developers to include more graphical interest and interactivity in a Web page, without the Web page accessing the Web server. That is, the client’s computer automatically updates and changes its own content. These Web pages display much faster than Web pages created with HTML. Ruby on Rails (RoR), also called Rails, is an open source framework that provides technologies for developing object-oriented, database-driven Web sites. Rails uses a free, object-oriented scripting language called Ruby, which is derived from a variety of languages including Ada, LISP, Perl, and Smalltalk. Rails is designed to make Web developers more productive by providing them an easy-to-use environment and eliminating time-consuming steps in the Web development process. Web 2.0 sites often use RSS, previously discussed, and Ajax. Ajax, which stands for Asynchronous JavaScript and XML, is a method of creating interactive Web applications designed to provide immediate response to user requests. Instead of refreshing entire Web pages, Ajax works with the Web browser to update only changes to the Web page. This technique saves time because the Web application does not spend time repeatedly sending unchanged information across the network. Web page authoring software generates HTML and XHTML tags from your Web page design. With Web page authoring software, you can view or modify the HTML or XHTML associated with a Web page. Sometimes, you may add an HTML or XHTML tag that the Web page authoring software does not provide. Learning HTML and XHTML basics will enable you to fine-tune Web page formats created with authoring software.

6. How are popular multimedia authoring programs used?
Multimedia authoring software allows programmers to combine text, graphics, animation, audio, and video in an interactivepresentation. Many programmers use multimedia authoring software for computer based training (CBT) and Web-based training (WBT). Popular Web page authoring programs typically share similar features and are capable of creating similar applications. Popular programs include ToolBook and Director. ToolBook, from SumTotal Systems, has a graphical user interface and uses an object oriented approach, so that programmers can design multimedia applications using basic objects. These objects include buttons, fields, graphics, backgrounds, and pages. Director, from Adobe Systems, is a popular multimedia authoring program with powerful features that allow programmers to create highly interactive multimedia applications.

7. What are the six steps in the program development life cycle?
Program development consists of a series of steps programmers use to build computer programs. As Chapter 12 discussed, the system development life cycle guides information technology (IT) professionals through the development of an information system. Likewise, the program development life cycle (PDLC) guides computer programmers through the development of a program. The program development life cycle consists of six steps :
1. Analyze Requirements
2. Design Solution
3. Validate Design
4. Implement Design
5. Test Solution
6. Document Solution
The steps in the program development life cycle form a loop. Program development is an ongoing process within system development. Each time someone identifies errors in or improvements to a program and requests program modifications, the Analyze Requirements step begins again. When programmers correct errors or add enhancements to an existing program, they are said to be maintaining the program. Program maintenance is an ongoing activity that occurs after a program has been delivered to users, or placed into production.

8. How is structured design different from object oriented design?
In structured design, sometimes called top-down design, the programmer typically begins with a general design and moves toward a more detailed design. This approach breaks down the original set of requirements into smaller, more manageable sections. The first step in top-down design is to identify the major function of a program, sometimes called the main routine or main module. Next, the programmer decomposes (breaks down) the main routine into smaller sections, called subroutines or modules. Then, the programmer analyzes each subroutine to determine if it can be decomposed further. With object-oriented (OO) design, the programmer packages the data and the program (or procedure) into a single unit, an object. When the structure of an object changes, any program that accesses the object automatically accesses the change. The concept of packaging data and procedures into a single object is called encapsulation. That is, an object encapsulates (hides) the details of the object.

9. What are the basic control structures and design tools used in designing solutions to programming problems?
To help document a solution algorithm, programmers use design tools. Two structured design tools are program flowcharts and pseudocode. A design tool for object-oriented design is the UML.
• A program flowchart, or simply flowchart, graphically shows the logic in a solution algorithm. The American National Standards Institute (ANSI) published a set of standards for program flowcharts in the early 1960s. These standards, still used today, specify symbols for various operations in a program’s logic. Programmers connect most symbols on a program flowchart with solid lines. These lines show the direction of the program. Dotted lines on a flowchart connect comment symbols. A comment symbol, also called an annotation symbol, explains or clarifies logic in the solution algorithm.
• Pseudocode uses a condensed form of English to convey program logic. Some programmers prefer to explain the logic of a solution algorithm with words (pseudocode), instead of a graphical flowcharting technique. Pseudo code also uses indentation to identify the control structures. The beginning and ending of the module start at the left margin.

No comments:

Post a Comment