8.1~8.8

January 23, 2008 at 6:43 pm (Uncategorized)

8.1 1.A hypertext is a structure consisting of nodes and the links between them.2. Hypermedia is like hypertext, but it adds GUIs, Images, Sound, Animation, Applications.3. Assigning node addresses using machine-independent hypertext markup language. 8.21.HTML is developed as a machine-independent way of representing information in a networked-based hypermedia system.  2. It can indicate the format of textual elements or links to other nodes. 3. The text for the document goes here. 4. The HTML is a comment for the creator to reviews.8.31. The HTML programmer need to use forced line break because a web page author or designer wants to display several lines of text without words wrap.2. We are preformatted next in an HTML document when we want the browser to display text, with line breaks, extra spaces, and tabs.3.8.41. If you forget to close the markup tag for italics on a piece of text everything after the first quote will be italics.2.The purposes of the escape sequence in HTML is to let browser to display these characters rather than interpret them.8.51. The three types of HTML are: Unordered(bulleted)list-Numbered(ordered)list-Definition(association)lists-display terms and their associated definition. 8.6

2.An absolute path name because it sepcifies the exact or absolute position of the file in the computer’s directory structure.
3.We can use absolute or relative path names to specify the location of a target document.
8.7
1.Inline images increase a document’s size and slow its transfer across the Internet. External images which are not display until the user clicks on a link.
2.<IMG src=”ImageLocation”>
3.<IMG SCR=”mypicture.gif”HEIGHT=200 WIDTH=200>
4.<A href=”mypicture.gif”>Sample picture</A> <A href=”mypicture.gif”><IMG src=”mythumbnail.gif”></A>  8.9
1.An applet is a Java application that runs in a Web page, an HTML document that contains an applet markup tag. Example:<APPLET CODE=”byte code file name” WIDTH=width HEIGHT=height></APPLET>
2.Applications that use a specialized view class for the main window, the conversion to an applet is surprisingly simple. First, replace the name JFrame with the name JApplet at the begining of the class definition. Second, replace the class’s constructor by the method init: public void init(){ }
3.An applet cannot access files on the ensure security on the user’s machine.
4. The images must reside on the Web server from which the applet’s byte code was sent. The JApplet method getDocumentBase() locates and returns the URLof the applet’s Web server. The JApplet method getImage expects this URL and the filename of an image as parameters. The method downloads the image from the Web server and returns an object of the class Image. This object can be converted to an ImageIcon object for further processing by using the ImageIcon(anImage) constructor.

Permalink Leave a Comment

Ch7 7.2~7.5

January 10, 2008 at 7:43 pm (Uncategorized)

EX 7-2

1.)The structure of a query-controlled loop that processes repeated sets of inputs is the String variable doInAgain. This variable controls how many times the loop repeats, initially, the variable equals “y”. As soon as the user enters a string other than “y” or “Y”, the program terminates.2.)

EX 7-3

1.)The role the menu plays is to display a list of options, after this, the user can select the one they needs.2.)The menu-driven programs prompts fro additional inputs related to that option and performs the needed computations, after which it displays the menu again.

Ex 7-4 1

a.)%11s b.)%12s  c.) %-15  d.)System.out.intf(“%60″, e.)System.out.printf(%10.2f)

 2  a.)10,000.50, b.)45 632, c.)34.54

Ex7-5

1.)
2.)The programmer embeds the call to an input method in a try-catch statement, as its name implies, this statement consists of two parts. The statement within the try clause are executed until one of them throws an exception. If that happens, an exception object is created and sent immediately to the catch clause. The code within the catch clause is then executed. Alternatively, if no statement throws an exception within the try clause, the catch clause is skipped.

Permalink Leave a Comment