【HarmonyOS】Application Developer Basic Certification Exam 100 points

HarmonyOS Application Developer Basic Certification Exam. Passed 100 points


HarmonyOS Application Developer Basic Certification Examination, the original intention of this blog is to help you check for omissions and know where the mistakes are, but it is not recommended to copy the answers. What you get on paper will eventually make you feel shallow. I hope it can help you get the ideal exam. score!

  • True or False

1.Ability is the smallest unit of system scheduling application and a component that can complete an independent function. An application can contain one or more capabilities.
(correct)

2. The Tabs component can only contain the sub-component TabsContent. Each tab corresponds to a content view, which is the TabContet component.
(correct)

3. When using the http module to initiate a network request, you must use on(‘headersReceive’) to subscribe to the request header, and the request will be successful.
(Error)

4.Web components can use the zoom(factor: number) method to zoom on all web pages.
(Error)

5. Preferences store data in the form of Key-Value, where Key can be repeated.
(Error)

6. Each custom component has its own life cycle.
(correct)

7. In the Column and Row container components, justifyContent is used to set the alignment format of the sub-component in the main axis direction, and alignItems is used to set the alignment format of the sub-component in the cross-axis direction.
(correct)

8. The @CustomDialog decorator is used to decorate custom pop-up window components so that the pop-up window can dynamically set content and style.
(correct)

9. All custom components decorated with @Component support onPageShow, onBackPress and onPageHide life cycle functions.
(Error)

10.Video component can support local video path and network path playback. When playing online videos, you need to apply for the permission ohos.permission.INTERNET.
(correct)

11. Each time the router.pushUrl() method is called, by default, the number of page stacks will be increased by 1, and the maximum number of pages supported by the page stack is 32.
(correct)


  • Multiple choice questions

12. Which of the following permissions are required to load network images using the Image component?
(B)
A. ohos.permission.READ_MEDIA
B. ohos.permission.INTERNET
C. ohos.permission.GET_NETWORK_INFO
D. ohos.permission.DISTRIBUTED_DATASYNC

13. Which of the following methods can jump to a new page and destroy the current page.
(B)
A. router.pushUrl()
B. router.replaceUrl()
C. router.back()
D. router.clear()

14. Which component decorated with a decorator can be used as a page entry component?
(B)
A. @Component
B. @Entry
C. @ Preview
D. @Builder

15. Which of the following combinations cannot achieve bidirectional data synchronization between child components and parent and child components.
(D)
A. @State and @Link
B. @Provide and @Consume
C. @Observed and @ObjectLink
D. @State and @Prop

16. Regarding the container components Row and Column, which of the following statements is wrong:
(D)
A. The main axis of the Column container is vertical. , the cross axis is the horizontal direction; the main axis of the Row container is the horizontal direction, and the cross axis is the vertical direction.
B. The main axis and the cross axis are always perpendicular to each other, and the directions of the main axes of Row and Column are different.
C. The alignment of Column's subcomponents in the main axis direction is set using the justifyContent attribute, and its parameter type is FlexAlign.
D. The alignment of Row's subcomponents in the cross-axis direction is set using the alignItems attribute, and its parameter type is HorizontalAlign.

17.What data types are supported for storing preferences values?
(D)
A. Numeric type
B. Character type
C. Boolean Type
D. Numeric type, character type, Boolean type and array types of these three types

18.Bottom side 哪个组格implicit inclusion child combination:
(D)
A. Row
B. Button
C. Text
D. LoadingProgress

19. Regarding the @State state data characteristics, the following description is wrong:
(C
A. The variables decorated by @State are internal to the component When these state data are modified, the build method of the component will be called to refresh the UI.
B. The properties marked @State are private variables and can only be used within the component. Access.
C. The @State variable does not need to be given an initial value.
D. The variable decorated by @Link of the sub-component can be established with the @State variable of the parent component Two-way data binding.

20. The incorrect description about Resource is a resource reference type:
(C
A. Resource is a resource reference type and is used to set components The value of the attribute.
B. Reference application resources in the form of "$r('app.type.name')", app represents the resources defined in the resources directory within the application, type Represents the resource type (or resource storage location).
C. Resource supports all data types.
D. The system can load appropriate Resource resources according to the current configuration , for example, developers can render different layout effects based on screen size, or provide different strings based on language settings.

21. Which of the following modules needs to be imported for page routing?
(B)
A. import prompt from '@ohos.prompt'
B. import router from '@ohos. router'
C. import Notification from '@ohos.notification'
D. import window from '@ohos.window'

22. There are two Text components in the Row component. If you use the justifyContent alignment method, which of the following attributes can achieve alignment between the left and right ends:
(D)
A. FlexAlign.Start
B. FlexAlign.SpaceEvenly
C. FlexAlign.End
D. FlexAlign.SpaceBetween

23. Regarding Web components, the following description is wrong:
(D)
A. WebController controller can control various behaviors of Web components , such as forward, backward, runJavaScript, etc.
B. Web components support the setting of multiple attributes such as fileAccess and javaScriptAccess. For example, .javaScriptAccess(true) means that JavaScript scripts are allowed to be executed.
C. Web components support onConfirm, onConsole and other events. For example, the onConfirm callback is triggered when a confirm() alarm is called on the web page.
D. Using web components to access online and offline web pages requires adding the ohos.permission.INTERNET permission.

24. Which of the following event methods can obtain the offset of List sliding
(A)
A. onScroll< a i=3> B. onScrollIndex C. onReachStart D. onReachEnd


25. Regarding the startup mode of UIAbility, which of the following statements is wrong:
(C
A. UIAbility supports single instance, standard mode and designated There are 3 startup modes for instances, configured through launchType in module.json.
B. singleton is a single instance mode. There is only one instance in the system. When startAbility, if it already exists, it will be reused. The only instance in the system.
C. standard is the standard mode. A new instance will be started every time startAbility is started. The system defaults to the standard mode.
D. specified refers to the specified instance mode, and Ability's internal business determines whether to create multiple instances at runtime.

26. Maximum length limit size () character for the key selection?
(C
A. 60
B. 70
C. 80
D. 90

27. Which of the following modules needs to be imported to initiate a network data request?
(A)
A. import http from '@ohos.net.http'
B. import http from '@ ohos.net.https'
C. import request from '@ohos.request'
D. import request from '@ohos.net.request'

28. Regarding the callback event of the Video component, which of the following statements is wrong:
(A)
A. This event is triggered when the onStart video is played. , where you can get the video duration.
B. onFinish This event is triggered when the video playback ends.
C. onPrepared This event is triggered when the video preparation is completed.
D. onUpdate This event is triggered when the playback progress changes. The unit is s and the update interval is 250ms.

29. Regarding the position setting of the Tabs component, the following description is wrong
(D)
A. When barPosition is Start (default value), when the vertical attribute is false (default value), the tab is located at the top of the container.
B. When barPosition is Start (default value) and the vertical attribute is true, the tab is located on the left side of the container
C. When barPosition is End, the vertical attribute is When false (default value), the tab is located at the bottom of the container.
D. When the barPosition is End and the vertical attribute is true, the tab is located at the bottom of the container.

30. For example, if you want to implement an advertising pop-up window that contains information such as pictures and text, you can use the following pop-up window to achieve it
(B)
A. AlertDialog
B. @CustomDialog
C. TextPickerDialog
D. TimePickerDialog

31. Regarding the Button component, which of the following styles is a capsule button:
(A)
A. ButtonType.Capsule< a i=3> B. ButtonType.Normal C. ButtonType.Circle D. None of the above


32. In which of the following files can the path configuration information of the page be set?
(A)
A. main_pages.json
B. module.json5
C . app.json5
D. package.json


  • Multiple choice questions

33. Which of the following container components can be scrolled by D
(A,B,D)
A. Scroll
B. List
C. Row
D. Grid
E. Column

34. For components containing text elements, such as Text, Button, TextInput, etc., which of the following attributes can be used:
(A,B,C,D,E)
a> A. fontColor
B. fontSize
C. fontStyle
D. fontWeight
E. fontFamily

35. The following description of the basic components of the ArkTS declarative development paradigm is correct:
(A,B,C,D,E,F)
A. Decorator: Used to decorate classes, structures, methods and variables to give them special meanings. For example, @Entry indicates that this is an entry component.
B. Custom components: reusable UI units that can be combined with other components.
C. UI description: Declarative method to describe the structure of the UI, such as the code block in the build() method.
D. Built-in components: Basic components and layout components built in by default in ArkTS, which developers can call directly, such as Column, Text, Divider, Button, etc.
E. Attribute method: used to configure component attributes, which are set uniformly through attribute methods, such as fontSize(), width(), height(), color(), etc.
F. Event method: used to add the component's response logic to events, and set it uniformly through event methods, such as onClick() following Button.

36.Which of the following component hierarchies are correct?
(A,B,E)
A. Text>Span
B. Button>Column>Image
C. Button>Image>Text
D. Image>Text>Span
E. Column>Row>Button

Module.json5 under 37.entry contains the following information:
(B,C,D)
A. Application package name and version Number information
B. Ability configuration information
C. Device type information
D. Application permission application list

38. Regarding the Tabs component and the TabContent component, the following description is correct
(A,B,C,D)
A. TabContent component Setting the universal width property is not supported, and its width is equal to the barWidth property of the Tabs component.
B. The TabContent component does not support setting the universal height attribute. Its height is determined by the height of the parent component Tabs and the height of the TabBar component.
C. TabsController is used to control Tabs components for tab switching. It does not support one TabsController controlling multiple Tabs components.
D. The tabBar property of the TabContent component supports components generated using the @Builder constructor.

39.Is the life cycle cycle function of Ability trivial?
(A,B,E,F)
A. onCreate
B. onDestroy
C. onPageShow
D. onPageHide
E. onForeground
F. onBackground

40. The correct description of the ForEach(arr, itemGenerator, index) component is:
(B,C,D)
A. In ForEach, you can loop through the logic code, such as console.info('hello')
B. The first parameter must be an array to provide the data source for loop rendering.
C. The second parameter is a lambda function that generates subcomponents for each array item in the data source.
D. The third parameter is an anonymous function used to generate a unique and stable key value for a given array item.

  • Next

【HarmonyOS】HarmonyOS Application Developer Advanced Certification 96 points

Guess you like

Origin blog.csdn.net/weixin_42473228/article/details/134431887