1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16abstract class AbstractClass {
17    private _age: int;
18    private _value: int;
19
20    abstract get age(): int;
21    abstract set age(a: int);
22    abstract set value(v: int);
23    abstract get value(): int;
24}
25
26class ChildClass extends AbstractClass {
27    private _age: int;
28    private _value: int;
29
30
31    override get age(): int {
32        return this._age;
33    }
34
35    override set age(a: int): void {
36        this._age = a;
37    }
38
39    override set value(v: int): void {
40        this._value = v;
41    }
42
43    override get value(): int {
44        return this._value;
45    }
46}
47