我們大一Java作業,貌似是有關JDBC和SOLID的。

CSDN問答 2022-01-07 16:12:31 阅读数:629

大一 java 貌似 似是 jdbc

Company. Define the hierarchy of IT company employees. Gather employees to carry out the project with a determination of its total cost.

REQUIREMENTS.

1. Use only standard compilers and libraries.

2. When coding, conventions on the design of the code for the corresponding language should be used - code convention.

3. Use the capabilities of OOP: classes, inheritance, polymorphism, encapsulation.

4. Do not use the graphical interface! The application must be console.

5. Work with the console or the console menu should be minimal, since the MAIN OBJECTIVE of the TASK is to CHECK OOP PERCEPTION.

6. Use external data sources: files, DBMS

7. Transfer initialization data of objects using a constructor, function, or method (for example, for Java:

Student ob = new Student (456543, 19, "Smith");

Or use database repositories

8. Provide only the source code of the application. In addition, it is possible to explain in a free but concise form what was done and why.

Comment the whole code

9. Also, to complete the task, you need to study relational databases, and SQL.

10. package name kz.aitu.oop.practice.assignment4  (include sql ddl)

11. send it to github and commit link here. commit message - "My OOP assignment 4 - company

我好不容易學會了java基礎,老師就又來了這種類型的題,由於語言不通,老師講的不是很理解。

貌似是讓我們使用接口,連接數據庫,使用java語言導入數據,及使用preparedStatement,這些知道一點,但關於各個類接口之間的關系很混亂,不知道該怎麼弄,有沒有大佬可以講解一下啊。




采納答案:

 想問一下,有employees和project兩個錶的話,是多對一的關系,這個在java中怎麼用代碼錶示啊?就是兩個錶格之間的關系,primary key和foreign key.



其他答案2:
版权声明:本文为[CSDN問答]所创,转载请带上原文链接,感谢。 https://gsmany.com/2022/01/202201071612308878.html