Mục Lục
Mục Lục
Hướng Dẫn Cài Đặt Môi Trường Video - Hướng dẫn cài đặt môi trường Video - Hướng dẫn tạo dự án Hello World Video Hướng dẫn phát hành dự án java - Lập trình Java căn bản Java Basic- Tạo dự án đầu tiên & phát hành dự án 01. Hướng dẫn cài đặt môi trường lập trình Java- lập trình Java 02. Hướng dẫn tạo dự án Java đầu tiên - lập trình Java căn bản Khai Báo Biến & Mệnh Đề Điều Kiện & Vòng Lặp In chuỗi Fibonaci Java Basic- In chuỗi ngược String in java Giải phương trình bậc nhất & Phương trình bậc 2 - Java 🌟 Bộ Bài Tập Tổng Hợp Java Core: Biến – Toán Tử – If/Else – Vòng Lặp – Bài Toán Nâng Cao Array Video Hướng dẫn Collections Java | List & ArrayList Java | Vector Java | Map & Hashmap Java | String Java Java Basic - Tìm dãy số nguyên tố trong mảng Video Test - Tìm kiếm chuỗi trong chuỗi OOP - Tích Chất Đóng Gói & Kế Thừa Video OOP - Tích chất bao đóng - Kế thừa trong Java - Lập trình Java căn bản Video OOP - Tính Chất Đa Hình - Tính Chất Trừu Tượng - Lập Trình Java Căn Bản Quản Lí Cán Bộ Video Quản Lí Cán Bộ OOP - Interface Video Java Basic- OOP - Tổng hợp - Quản lý sở thú TEST- Chương trình quản lý rạp chiếu film bằng java Video Hướng dẫn cú pháp Lambda Java | Tạo anonymous class Java | Interface Java & Abstract Java Video Hướng dẫn tìm hiểu Singleton Design Pattern Java | Singleton Object Java | OOP Java cho người mới Examination & Test Exam - Kiểm tra 60 phút lập trình OOP - Quản lý thiết bị máy tính - Lập trình OOP Video Exam - Kiểm tra 60 phút lập trình OOP - Quản lý thiết bị máy tính - Lập trình OOP [Examination] Xây dựng Hệ thống Phân cấp Đối tượng Hình học - Khoá Java Cơ Bản Java Swing Video Hướng dẫn học Java Swing | Ví du quản lý sinh viên Java | Java Swing cho người mới bắt đầu Ôn Tập Tổng Quát Java Basic Java basic- Assignment - Quản lý sách Java Basic - Quản lý ATM - Quản lý tài khoản ngân hàng Video Java Basic - Quản lý ATM - Quản lý tài khoản ngân hàng
Java Basic

Java Basic- OOP - Interface - Quản lý động vật java - đề tiếng anh

Question1:                                                                                                                          

Create an interface named as IAnimal with the below method:

            void  input(): input data from keyboard

            void display(): display information

Question2:                                                                                                                            

Create a class named as Animal which implements the IAnimal interface, and have attributes:

            private String name;

            private double weight;

+ Create two constructors, in which

-       Default constructor

-       Constructor with arguments used to assign value for Animal’s attributes.

+ Create get/set methods

+ Implement all methods from IAnimal to input data and display information of Animal

Question3:                                                                                                                          

Create a class named as Cat which extends from Animal  and have  an extra attribute:

            private String color;

+ Create two constructors, in which

-       Default constructor

-       Constructor with arguments used to assign value for Cat’s attributes and attributes extended from Animal.

+ Create get/set methods

+ Override all methods from Animal to input data and display information of Cat

Question3:                                                                                                                          

Create a class named as Chicken which extends from Animal  and have  some extra attribute:

            private int numberOfLeg;

+ Create two constructors, in which

-       Default constructor

-       Constructor with arguments used to assign value for Chicken’s attributes and attributes extended from Animal.

+ Create get/set methods

+ Override all methods from Animal to input data and display information of Chicken

Question4:                                                                                                                          

Create the test class named as AnimalTest to do the following action:

1)    Create an array for classes: Animal, Cat and Chicken with length 3.

2)    Create only one menthod inputDataForAnimal(): used to input data for array of Animal, Cat and Chicken

3)      Create only one menthod displayDataOfAnimal(): used to display information of all items in array of Animal, Cat and Chicken.

4)      Create main() method to test the above methods



Đăng nhập để làm bài kiểm tra

Chưa có kết quả nào trước đó

×