Part of the student's assessment can be semester work. Students should start thinking up assignments as early as the second week of the semester. Consult the assignment right from the end of the semester with your trainer.
The thesis should demonstrate, in addition to the creativity of the student, his ability to object design and the use of at least three of these technological units:
- graphical user interface (Java FX),
- database,
- collection,
- networking,
- multithreaded applications,
- AI.
An example would be a space shooter for two players with aliens controlled by artificial intelligence.
The goal of the project is to develop an email client that allows the user to manage their email messages, send and receive emails, view folders, and display and read the contents of emails.
The project consists of several classes and services, each of which performs a specific function in the email client. Here is a list of files sent earlier, by priority:
- Description: A class that represents an email account.
- Functionality: Stores account information, including email address, password, and connection properties. Provides methods for getting and setting field values.
import com.model.EmailAccount;
// Create an instance of an email account
EmailAccount emailAccount = new EmailAccount("user@example.com", "password");
// Getting and setting field values
String address = emailAccount.getAddress();
emailAccount.setAddress("newuser@example.com");
String password = emailAccount.getPassword();
emailAccount.setPassword("newpassword");
- Description: The class responsible for creating and managing graphical user interface components.
- Functionality: Creates instances of graphical components such as windows, dialog boxes, panels, and controls. Provides methods for displaying and manipulating the user interface.
import com.controller.services.ViewFactory;
// Instantiating a view factory
ViewFactory viewFactory = new ViewFactory();
// Creating and displaying a new window
viewFactory.createWindow("New window", 800, 600);
- Description: A class that manages email operations such as sending, receiving, and displaying emails.
- Functionality: Stores a list of email accounts, manages the process of sending and receiving emails. Provides methods for adding and removing accounts, sending and receiving emails.
import com.controller.EmailManager;
// Create an email manager instance
EmailManager emailManager = new EmailManager();
// Adding an email account to the manager
emailManager.addAccount(emailAccount);
// Sending an email
emailManager.sendEmail(emailAccount, "recipient@example.com", "Letter subject", "Email content");
- Description: An abstract base class for user interface controllers.
- Functionality: Provides common fields and methods used in controllers, such as access to the email manager and view factory.
import com.controller.BaseController;
// Instantiating the UI Controller
BaseController controller = new BaseController();
// Access to the email manager
EmailManager emailManager = controller.getEmailManager();
- Description: Service for displaying the content of an email message.
- Functionality: Downloads and displays the contents of an email message, including text and HTML formatting.
import com.controller.services.MessageRendererService;
// Create an instance of the message display service
MessageRendererService messageRendererService = new MessageRendererService();
// Loading and displaying message content
String messageContent = messageRendererService.renderMessageContent(message);
- Description: Service for the process of authentication and connection to e-mail.
- Functionality: Checks the user's credentials, establishes a connection to the mail server, adds an email account to the manager.
import com.controller.services.LoginService;
// Creating an Authentication and Connection Service Instance
LoginService loginService = new LoginService();
// Verifying User Credentials and Establishing a Connection
boolean loginSuccessful = loginService.login(emailAccount);
- Description: Service for updating information about email folders.
- Functionality: Periodically updates information about folders, gets the number of messages in each folder and updates their status.
import com.controller.services.FolderUpdaterService;
// Create an Instance of the Folder Update Service
FolderUpdaterService folderUpdaterService = new FolderUpdaterService();
// Launching a service to periodically update folders
folderUpdaterService.start();
- Description: Service for getting and displaying a list of email folders.
- Functionality: Loads a list of folders from the mail server, displays them in a hierarchical form, adds event listeners for changing the number of messages in folders.
import com.controller.services.FetchFoldersService;
// Instantiate the Get and Display Folder Service
FetchFoldersService fetchFoldersService = new FetchFoldersService();
// Loading and displaying the list of folders
fetchFoldersService.fetchFolders();
- Description: Service for sending emails.
- Functionality: Creates and sends an email, sets the sender, recipient, subject and content of the letter.
import com.controller.services.EmailSenderService;
// Create an instance of the mail service
EmailSenderService emailSenderService = new EmailSenderService(emailAccount, "Letter subject", "recipient@example.com", "Email content");
// Sending letter
emailSenderService.start();
Each of these files plays a specific role in the functionality of the email client and interacts with other classes and services to complete the application.
- Make sure you have Java Development Kit (JDK) version 8 or higher installed on your computer.
- Do a git clone on your computer's desktop.
- Open your development environment (such as IntelliJ IDEA or Eclipse).
- Import the "Email Client Service" project into the development environment as a Java project.
- Install all the necessary dependencies and libraries (IDE will tell you exactly what you need to install to successfully launch the project :).
- Locate and open the Launcher.java class, which contains the main() method, which will be the entry point to the application.
- Run the application by clicking the "Run" button or using the appropriate command in the development environment. Note: Depending on the development environment used and the project configuration, the startup procedure may vary slightly. Make sure you follow the instructions that are appropriate for your development environment and project.