Khoá học lập trình C# (.NET Core) Viết chương trình quản lý xe car bằng C # - C Sharp | Khoá học lập trình C#
- 5.0/5.0
- 2k Đăng ký
- Học lập trình
- Tiếng việt
Thông tin khóa học
1. Create an interface Icar that has the following methods:
● Method “calculateTax()”, returns the type float: calculate the tax of the car.
● Method “calculatePrice()”, returns the type float: calculate the total cost of the car.
● Method “getInfor()”, returns the type void: display the information of the car.
2. Create a class Car inherit from interface Icar. [6]
Declare fields has access modifier as private use for properties: name, producer, year, seat and rootprice.
● Create two constructors and all method get/set for its attributes
● Implement method calculateTax() to calculate the Tax as follows:
○ If the car has under 7 seats then tax = RootPrice * 60%.
○ Else tax = RootPrice * 70%
● Implement method calculatePrice() to calculate TotalPrice as follows:
○ TotalPrice=RootPrice + Tax
● Implement method getInfor() to show the information as follows: .... car produced by ... in ... has ... seats with the total price is ....$. Variable includes :name of the car, the name of the manufacturer, year of production, seats and TotalPrice (For example: Ford car produced by Ford in 1997 has 4 seats with the total price is 20000 $).
- Declaring class LuxuryCar inherits from class Car and adding follow attrubtes :
private float specialRate;
● Create two constructors and all method get/set for its attributes
● Override method calculatePrice to calculate TotalPrice as follows :
TotalPrice = RootPrice + Tax + RootPrice * specialRate
● Overload method calculatePrice with 1 parameter named “transportCost” with type float. It calculates TotalCost as follows: TotalPrice = RootPrice + Tax + RootPrice * specialRate + transportCost.
- Create a class named Test.
● Declare and initialize 1 instance named “myLuxuryCar” of class LuxuryCar.
○ Input Name, Producer, Year, Seat, rootPrice from the keyboard (Catch exception when input value). Display the contents of this LuxuryCar.
○ Calculate TotalPrice in case transportCost is $ 20,000, and display it.
Đăng nhập để làm bài kiểm tra
Chưa có kết quả nào trước đó
Chương trình
Nguyễn Văn An
Trần Thị Bích
Lê Hoàng Hải
Phạm Minh Tuấn
Đánh giá
B2. Đăng ký học
B3. Hoàn thành mua khoá học
B4. Thanh toán theo hướng dẫn
B5. Đợi chúng tôi kiểm tra thông tin và thêm bạn vào lớp học
Bước 1: Truy cập website https://gozic.vn/teacher/form
Bước 2: Điền thông tin theo yêu cầu. Để bản đăng ký được duyệt nhanh nhất, anh chị hãy điền đủ thông tin nhé.
Bước 3: Click vào "đăng ký ngay" để hoàn thành
Lưu ý:
Link video bài giảng mẫu: Video bài giảng mẫu là căn cứ để Trắc Nghiệm Việt duyệt về hình thức và chất lượng giảng dạy. Vì vậy anh chị hãy điền link này để đăng ký được duyệt nhanh nhất nhé.
Anh chị cũng nên mô tả kỹ về kinh nghiệm giảng dạy để Trắc Nghiệm Việt đánh giá nhé.
Chúc các anh chị và các bạn thành công, sớm gia nhập đội ngũ giảng viên Trắc Nghiệm Việt!
499,000 VNĐ
1,299,000 VNĐ
Tổng quan khóa học
- Bài học 67
- Thời gian Linh hoạt
- Mức độ Mới bắt đầu
- Ngôn ngữ Tiếng việt
- Chứng chỉ Không
Trần Văn Điệp
Founder tại QViet.vn