最新的IT Specialist HTML5 Application Development - INF-306免費考試真題

You define the Pet class as follows:
class Pet {
constructor(name, breed) {
this.name = name;
this.breed = breed;
this.show = function() {
var text = " < p > Your pet ' s name is " + name + " . The pet ' s breed is " + breed + " . < /p > " ; return text;
};
}
}
You need to derive a Dog class from the Pet class.
Complete the code by selecting the correct option from each drop-down list.
Note: You will receive partial credit for each correct selection.
正確答案:

Explanation:
First blank: class Dog extends Pet {
Second blank: super(name, breed);
The correct syntax for deriving one JavaScript class from another is extends, so the derived class declaration must be class Dog extends Pet {. This creates Dog as a subclass of Pet, allowing Dog instances to inherit members defined by the Pet constructor, including name, breed, and the show() function assigned inside the parent constructor. Inside a derived class constructor, super() must be called before using this. The call super (name, breed); invokes the parent Pet constructor and passes the values required to initialize the inherited name and breed properties. Pet(name, breed); is incorrect because a class constructor cannot be invoked like a normal function. Pet.constructor(name, breed); is also incorrect because it does not call the parent constructor for the current instance. After super() runs, the Dog constructor can safely assign subclass-specific properties such as price and gender. References/topics: JavaScript classes, inheritance, extends, derived constructors, super(), custom class creation.
You need to use a flexbox so that new content you add to the container appears at the highest point on a vertical list. You want to achieve this goal without specifying an order. Which value should you use for flex- direction?

正確答案: C
說明:(僅 Fast2test 成員可見)
Which two functions support 2D transformations in CSS3? Choose 2.

正確答案: C,E
說明:(僅 Fast2test 成員可見)
Which two functions support 2D transformations in CSS3? Choose 2.

正確答案: B,D
說明:(僅 Fast2test 成員可見)
You need to define a grid that meets the following requirements:
* Explicitly sets the width of 6 equal columns of 1 fraction
* Explicitly sets 5 varied sized rows
* Defines 15px of space between each grid column
* Defines 10px between each grid row
Complete the code by selecting the correct option from each drop-down list.
正確答案:

Explanation:
display: grid;
grid-template-columns: repeat(6, 1fr);
grid-template-rows: 50px 50px 150px 150px 100px;
grid-gap: 10px 15px;
The correct grid definition starts with display: grid;, which turns the element into a CSS Grid container. To explicitly create six equal-width columns, the correct property is grid-template-columns, and the most efficient value is repeat(6, 1fr). The repeat() function avoids writing 1fr six separate times, while 1fr assigns each column one equal fraction of the available grid width. The five row sizes must be explicitly declared with grid-template-rows, using the exact varied values shown: 50px 50px 150px 150px 100px. This creates five rows with fixed pixel heights. For the spacing requirement, grid-gap: 10px 15px; is the correct shorthand.
The first value controls the row gap, so rows are separated by 10px; the second value controls the column gap, so columns are separated by 15px. References/topics: CSS Grid containers, explicit grid tracks, grid-template- columns, grid-template-rows, repeat(), fractional units, grid gaps.
Which two CSS segments are valid filter properties? Choose 2.

正確答案: A,D
說明:(僅 Fast2test 成員可見)
You create an interface for a touch-enabled application. Some input buttons do not trigger when tapped. What are two possible causes?

正確答案: C,D
說明:(僅 Fast2test 成員可見)

聯系我們

如果您有任何問題,請留下您的電子郵件地址,我們將在12小時內回复電子郵件給您。

我們的工作時間:( GMT 0:00-15:00 )
週一至週六

技術支持: 立即聯繫 

English 日本語 Deutsch 한국어