Unit 1.1
T0001
Information on the web might not be accurate. √
T0002
Valid URLs include which of the following?
I.ftp://ftp.carnegietech.org/courses/course2.html √
II.http://www.carnegietech.org/courses/course2.html √
III.http://www.whitehouse.gov/president/ ×
T0003
You can call an application a client in a client/server architecture if the application requests information from a computer on the Internet that provides information to many consumers.
T0004
Which of the following is(are)true about regulation of information on the Web?
I. The Advanced Research Project Agency(ARPA) ensures that the contents of Web pages are accurate. ×
II.The Web administrator regulates all of the content on the Web to ensure it is accurate. ×
T0005
In the following URL, what is the name of the server?
http://www.carnegietech.org/courses/course1.html
T0006
The first part of a full-specified URL is the protocol identifier.
T0007
A program that finds Web pages based on user input is typically referred to as a search engine.
T0008
The Internet is a worldwide computer network.
T0009
The term Web server refers to a program that provides information requested by a Web client.
T0010
When you browse the Web, you typically want to examine information stored on a variety of Web servers in different places.
T0011
A copyright is a form of legal protection that exclusively grants the copyright owner which of the following rights with regard to the copyright software?
I.Copying √
II.Distributing and selling √
III.Modifying √
T0012
Software is classified as system software if the only reason it is needed is to run a computer.
T0013
A software license may extend the rights given by copyright laws.
T0014
Which of the following types of licenses usually allows the use of the software for a trial period?
Shareware
Unit 1.2
T0001
Which of the following in an HTML file cause(s) a line break to occur in aWeb page?
<br>
T0002
A browser uses HTML tags in deciding how to display text.
T0003
In an HTML page, which of the following tags directs Web browsers to display the page with a blue background?
<body bgcolor="#0000FF"> //RGB
T0005
In HTML, the aattribute size of tag<font>can be validly assigned values from 1 to 7.
T0006
In HTML, an ordered list begins with the tag <OL>, adn each item in the list begins with the tag <LI>.
T0007
The <HR>tag is used for drawing a horizontal line.
T0008
The role of the <BODY>tag is to delimit the viewable area of the page.
T0009
Which of following HTML tags is(are) typically found within tags <table> and </table>
<tr><td>
T0010
What is the conceptual difference between logical and physical styles?
Logical styles are intended to specify the meaning of content, whereas physical styles are used to specify the look of content.
T0011
Which of the following is(are) necessary for a radio button or checkbox control in an HTML form to be considered successful?
I.It must be checked or selected. √
II.The HTML FORM element in which it appears must contain at least one INPUT element with a type of hidden. ×
III.The HTML element that defines it must set a value for the attribute named value. √
T0012
The action attribute of an HTML FORM element determines the processing agent to which the data of the form is submitted.
T0013
In the name-value pairs that represent a submitted HTML form, names are seperated from values by the character = . and pairs are seperated from one another by the character & .
T0015
In an HTML FORM element, the values get and post are the only valid options for which of the following attributes? method
T0016
A Java servlet is a program that typically runs inside Web server.
T0017
Consider the following HTML FORM element.
<FORM action='/servlet/Welcome' method='post'>
The action attribute in the above element specifies which of the following regarding the servlet used to process this form?
I.THe name of the servlet √
II.The location of the servlet √
T0019
The control of a client-server transaction maintained by the Web server is known as server push.(服务器推送)
T0020
.Java servlets enable dynamic content at the server side of the implementation of an application.
相对URL
Assuming the current directory structure is /root/layer1/layer2, root is the root directory, current user is in a page of the layer1
Relative URL Description | |
Href="../index.htm" | root/index.htm |
Href="layer2/mynote.htm" | root/layer1/layer2/mynote.htm |
Href="/help.htm" | root/help.htm |
Href="../layer11/submit.htm" | root/layer11/submit.htm |
请画出下列HTML代码所展示的内容
<html>
<head>
<title>HTML</title>
</head>
<body>
<form action="server/server" method="post">
<input type="hidden"name="data"value="July,2022">
<label>Name:
<input type="text" name="text1"value="Enter your Name"><br>
</label>
<input type="checkbox"name="genre"value="drama"checked>drama
<input type="checkbox"name="genre"value="comedy"checked>comedy
<input type="checkbox"name="genre"value="ramance">ramance
<input type="checkbox"name="genre"value="action">action
<br>
<input type="radio"name="price"value="It4">under $4.00
<input type="radio"name="price"value="4-6"checked>$4.00-$6.00
<input type="radio"name="price"value="6-8">$6.00-$8.00
<input type="radio"name="price"value="gt8">over $8.00
<br>
<textarea name="info"rows="10"cols="40">
Please enter a list of all your top 5 favorite movies:
1.
2.
3.
4.
5.
</textarea><br><br>
<select name="view"size="2">
<option>theatre</option>
<option>drive-in</option>
<option>video</option>
<option>television</option>
</select><br>
<button name="senddata"type="submit">Submit Data</button>
<button name="cleardata"type="reset">Clear Data</button>
</form>
</body>
</html>
2.1小测试
4.When compiling a Java program that contains syntax errors, the Java compiler will always report syntax errors at some approximate locations and will not successfully compile.
6.Valid Java comments include which of the following?
I./* this is an /* embedded */ comment */ ×
II./* this is an //embedded // comment */ √
III.// this is a comment */ √
8. Application programming Interface(API) is a term for a set of classes and methods that provide a reusable foundation for a programmer?
10. Which of the following is(are) true regarding programming in Java?
I.Java has a set of rules that govern what an acceptable program is. √
II.Java has a set of keywords whose meanings can be customized by the programmer. ×
III.Java does not distinguish between uppercase and lowercase. ×
2.2小测试
1.The following is a Java program segment:
public void paint (Graphics g)
{
int x = 10;
int y = 20;
paintPicture( g, x, y);
}
public void paintPicture(Graphics g, int a, int b)
{
g.setColor(Color.red);
// more code follows
}
What will be the value of the parameter "a", in the method paintPicture when this code is executed?
10
3.Consider the following Java code segment.
public class IQ
{
public int getIQ(String s)
{
return 50;
}
}
If object p is an instance of class IQ, which of the following is a Java statements that will not generate a compilation error?
getIQ.p("bob"); ×
int c = p.getIQ("Alex"); √
6.In Java, which of the following is true about constructors?
B.Constructors can only accept primitive Java types as parameters. ×
D.Constructors cannot return a value. √
9.Consider the following Java code fragment.
public class TrafficLight{
int status;
public void changeStatus(int newStatus) {
status = newStatus;
}
public void turnOn(int newStatus) {
// . . .
}
}
In the method turnOn, which of the following statements should be used to call method
changeStatus?
C.changeStatus.newStatus; ×
D.changeStatus(newStatus); √
12.下列TomTest类的类体中, 【代码1】——【代码5】哪些是错误的
class Tom {
private int x=120;
int y=20;
int z=11;
private void f(){
x=200;
System.out.println(x);
}
void g(){
x=200;
System.out.println(x);
}
}
public class TomTest {
public static void main(String[] args){
Tom tom=new Tom();
tom.x=22; //【代码1】
tom.y=33; //【代码2】
tom.z=55; //【代码3】
tom.f(); //【代码4】
tom.g(); //【代码5】
}
}
代码1 ×
代码2 √
代码3 √
代码4 ×
代码5 √