Part 1: [7 points] Using Java language to build an application. This app is an example to expose parts of your classes.

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Part 1: [7 points] Using Java language to build an application. This app is an example to expose parts of your classes.

Post by answerhappygod »

Part 1: [7 points]
Using Java language to build an application. This app is anexample to expose parts of your classes. Consider the class diagramas follows:
The Organization class contains the“communicateByTool()” method. This method describes thecommunication way between members. For now, we don’t have anyinformation to implement it, so it should be the abstractmethod.
The Colony class and University class willextend the Organization class, they must override the“communicateByTool()” method.
The BeeColony class and FPTUniversity classhave got quite different inheritance hierarchies. But bothcreate workers and they don't share much in common. So, wedeclare an interface named “Role” that contains the“createWorker()” common method. These classes will implementit.
To complete this task you will implement the classstructure above
Step 1: Create a new project named“OrganizationManager”.
Step 2: Create a package named“DTO”, it contains some files: Organization.java,Colony.java, University.java, BeeColony, and FPTUniversity.java
Step 3: Create another packagenamed “GUI”, it contains the Tester.java file
Requirements:
1. In the file Organization.java
2. In the file Colony.java,
3. In the file BeeColony.java,
4. In the file University.java,
5. In the file FPTUniversity.java,
6. In the file Tester.java, you type:
Part 1 7 Points Using Java Language To Build An Application This App Is An Example To Expose Parts Of Your Classes 1
Part 1 7 Points Using Java Language To Build An Application This App Is An Example To Expose Parts Of Your Classes 1 (17.35 KiB) Viewed 29 times
Please help me, thank you!!
Part 1 7 Points Using Java Language To Build An Application This App Is An Example To Expose Parts Of Your Classes 2
Part 1 7 Points Using Java Language To Build An Application This App Is An Example To Expose Parts Of Your Classes 2 (32.61 KiB) Viewed 29 times
public class Tester public static void main(String[] args){ Colony obj1=new BeeColony(2000, "honey", "land"); System.out.println(obj1); obj1.grow(); obj1. reproduce(); University obj2=new ERTUniversity(100000, "FPT", "Cantho"); System.out.println(obj2); obj2.enroll(); obj2.educate(); Role df= new BeeColony(3000, "wasp", "land"); System.out.println(df): of createWorker(): df= new FPTUniversity(100000, "FPT", "Hanoi"); System.out.println(df): dt, create Worker 0:
Colony #place: String (land/ocean) + Colony () + Colony (int, String) + communicate Extel): void + grow():void + reproduce():void + to String(): String BeeColonx type: String_(honey/wasp) + Bee Colony, () + Bee Colony, (int, String, String) + gettter/setter toString(): String <<abstract class>> Organization #size: int + Organization () + Organization (String) + getSize(): int + setSize(int):void + communicate Extel(): void, abstract +toString(): String <<interface>> Role + createWorker():void University #name: String + University () + University (int, String) + communicateBxTatool(): void + enroll():void + educate(): void + toString(): String FPTUniversity address: String + EPTUniversitx ( + FPTUniversitx (int, String, String) + gettter/setter toString(): String
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply