ehsanshahbazii / meyou-shop-application Goto Github PK
View Code? Open in Web Editor NEWپروژه دانشگاهی ترم اول درس مبانی برنامه نویسی دوره کارشناسی دانشگاه تبریز. پروژه با زبان جاوا توسعه داده شده و رابط کاربری نیز دارد. موضوع پروژه فروشگاهی
پروژه دانشگاهی ترم اول درس مبانی برنامه نویسی دوره کارشناسی دانشگاه تبریز. پروژه با زبان جاوا توسعه داده شده و رابط کاربری نیز دارد. موضوع پروژه فروشگاهی
It will be written with the database soon and new features will be added!
This project is related to the final project of the Tabriz University computer basics course. The limitations that should not be broken by me in this project is that I am not allowed to use the database and I can only use the JavaFile. That's why I did not want to implement many options with JavaFile, and next semester I will develop this project with a database and add many options.
🔴The path where the project folder should be placed is D driver. it's important notice.
because in javaFile i write absolute path of files like below:
D:\project final\src\files\data\cardInformation.txt
🔴Java must be installed on your system first. Then add the JFoenix and JavaFX libraries to the project.
Download an appropriate JDK for your operating system. The latest JDK can be downloaded from the official OpenJDK website.
Once installed, you can use the java
command from your command line.
Check if the correct java version is installed. The following shows the output for OpenJDK 15:
$ java -version
openjdk version "15" 2020-09-15
OpenJDK Runtime Environment (build 15+36-1562)
OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)
You need to set the JAVA_HOME environment variable to the JDK installation directory. You can follow this guide to set JAVA_HOME for your platform.
Libraries and their versions:
Download these ready-made libraries and add them to your project:
Ctrl+Alt+Shift+S
.src
|-- Main
| |-- Controller.java
| |-- Main.java
|-- controllers
| |-- bankingPortal
| | |-- BankingPortal.java
| | |-- FinalPayment.java
| |-- customer
| | |-- Login.java
| | |-- MainPage.java
| | |-- ProductAnchorPane.java
| | |-- ProductMainAnchorPane.java
| | |-- Signin.java
| |-- home
| | |-- GiftCard.java
| | |-- Message.java
| | |-- MessageComponent.java
| | |-- Notification.java
| | |-- NotificationComponent.java
| | |-- ProductPriceLineChart.java
| | |-- Service.java
|-- files
| |-- data
| | |-- ProductInformation.txt
| | |-- cardInformation.txt
| | |-- userInformation.txt
| | |-- userPaymentHistory.txt
| | |-- userProfileImage.txt
| | |-- userWalletBalance.txt
| | |-- usernameAndPassword.txt
| |-- image
| | |-- book
| | | |-- Atomic Habits.jpg
| | | |-- Clean Code.jpg
| | | |-- DS Kimetsu no Yaiba 1.jpg
| | | |-- DS Kimetsu no Yaiba 3.jpg
| | | |-- Death Note 1.jpg
| | | |-- Ikigai.jpg
| | | |-- The Midnight Library.jpg
| | | |-- Yeni Hitit 3rd.jpg
| | | |-- home body.jpg
| | | |-- loki where mischief lies.jpg
| | | |-- moriarty the patriot 1.jpg
| | | |-- the words i wish i said.jpg
| | |-- gif
| | | |-- spinner.gif
| | |-- gift card
| | | |-- 25654-2-major-credit-card-logo-transparent.png
| | | |-- img-716.jpg
| | | |-- img-719.jpg
| | | |-- img-721.jpg
| | | |-- img-722.jpg
| | | |-- img-724.jpg
| | | |-- img-727.jpg
| | |-- icon
| | | |-- 580b57fcd9996e24bc43c4f2.png
| | | |-- 580b57fcd9996e24bc43c518.png
| | | |-- 58419140a6515b1e0ad75a4c.png
| | | |-- 5847e991cef1014c0b5e4826.png
| | | |-- 5859902f4f6ae202fedf28d0.png
| | | |-- 587b511a44060909aa603a81.png
| | | |-- 587b518244060909aa603a8b.png
| | | |-- 5a314c90cb9a85480a628f7f.png
| | | |-- Ark-icon.png
| | | |-- Bitcoin-BTC-icon.png
| | | |-- Dollar-USD-icon.png
| | | |-- Ethereum-ETH-icon.png
| | | |-- change.png
| | | |-- dec208a64b794e63a2dcae992d9c7f85.png
| | | |-- icons8-account-64.png
| | | |-- icons8-bell-48.png
| | | |-- icons8-chart-64.png
| | | |-- icons8-coin-63.png
| | | |-- icons8-coin-64.png
| | | |-- icons8-coins-64.png
| | | |-- icons8-comment-64.png
| | | |-- icons8-favorite-50.png
| | | |-- icons8-favorite-60.png
| | | |-- icons8-gift-64.png
| | | |-- icons8-health-data-50.png
| | | |-- icons8-home-60.png
| | | |-- icons8-message-100.png
| | | |-- icons8-movie-ticket-48.png
| | | |-- icons8-search-64.png
| | | |-- icons8-settings-50.png
| | | |-- icons8-shopping-cart-50.png
| | | |-- icons8-star-48.png
| | | |-- icons8-wallet-48.png
| | | |-- instagram-logo-24.png
| | | |-- linkedin-square-logo-24.png
| | | |-- mainIcon.png
| | | |-- pngfind.com-tin-man-png-6105098.png
| | | |-- telegram-logo-24.png
| | | |-- twitter-logo-24.png
| | | |-- whatsapp-logo-24.png
| | | |-- \342\200\224Pngtree\342\200\224vector location icon_4231903.png"
| | |-- profile image
| | | |-- 12-modified.png
| | | |-- 2-modified.png
| | | |-- 22-modified.png
| | | |-- 30-modified.png
| | | |-- 59-modified.png
| | | |-- 64-modified.png
| | | |-- 81-modified.png
| | | |-- 82-modified.png
| | | |-- 83-modified.png
| | | |-- 92-modified.png
| | | |-- 94-modified.png
| | | |-- Man-1-icon.png
| | | |-- Man-14-icon.png
| | | |-- Man-16-icon.png
| | | |-- Man-6-icon.png
| | | |-- Man-9-icon.png
| | | |-- Woman-15-icon.png
| | | |-- Woman-9-icon.png
| | |-- service
| | | |-- icons8-lock-100.png
| | | |-- icons8-service-100.png
| | | |-- icons8-truck-100.png
|-- modules
| |-- files
| | |-- LoginCustomer.java
| | |-- SelectAndBuyProduct.java
| | |-- SigninCustomer.java
| |-- objects
| | |-- Customer.java
| | |-- Product.java
| |-- tools
| | |-- GlobalFileTools.java
| | |-- GlobalTools.java
| | |-- RandomData.java
|-- pages
| |-- bankingPortal
| | |-- bankingPortal.fxml
| | |-- finalPaymentPage.fxml
| |-- css
| | |-- LoginStyle.css
| | |-- bankingPortalStyle.css
| | |-- darkMode.css
| | |-- homePageStyle.css
| |-- customer
| | |-- LoginPage.fxml
| | |-- MainPage.fxml
| | |-- SigninPage.fxml
| | |-- productAnchorPane.fxml
| | |-- productMainAnchorPane.fxml
| |-- home
| | |-- giftCardPage.fxml
| | |-- lineChartProductPage.fxml
| | |-- messageComponentPage.fxml
| | |-- messagePage.fxml
| | |-- notificationComponentPage.fxml
| | |-- notificationPage.fxml
| | |-- sevicePage.fxml
We will first go into the details of the client project. this project made by 🔥Java and graphics of the program are written by Java FX, 🚀JFoenix useful library and the data storage part is written by Java File.
The customer part is divided into several parts, which are:
The body of the program is also divided into several parts, which are:
There are several options, some of which are as follows:
With this method, we perform the process of sending emails:
package com.company;
import java.util.Date;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
public class EmailUtil {
/**
* Utility method to send simple HTML email
* @param session
* @param toEmail
* @param subject
* @param body
*/
public static void sendEmail(Session session, String toEmail, String subject, String body){
try
{
MimeMessage msg = new MimeMessage(session);
//set message headers
msg.addHeader("Content-type", "text/HTML; charset=UTF-8");
msg.addHeader("format", "flowed");
msg.addHeader("Content-Transfer-Encoding", "8bit");
msg.setFrom(new InternetAddress("[email protected]", "NoReply-JD"));
msg.setReplyTo(InternetAddress.parse("[email protected]", false));
msg.setSubject(subject, "UTF-8");
msg.setText(body, "UTF-8");
msg.setSentDate(new Date());
msg.setRecipients(Message.RecipientType.TO, InternetAddress.parse(toEmail, false));
System.out.println("Message is ready");
Transport.send(msg);
System.out.println("EMail Sent Successfully!!");
}
catch (Exception e) {
e.printStackTrace();
}
}
}
package com.company;
import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;
public class MailSender {
public static void SendEmail(String recepient, String Title, String Text) {
Properties properties = new Properties();
properties.put("mail.smtp.auth", "true");
properties.put("mail.smtp.starttls.enable", "true");
properties.put("mail.smtp.host", "smtp.gmail.com");
properties.put("mail.smtp.port", "587");
String myAccountEmail = "ehs**********@gmail.com";
String password = "*****************";
Session session = Session.getInstance(properties, new Authenticator() {
@Override
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(myAccountEmail, password);
}
});
Message message = new MimeMessage(session);
try {
message.setFrom(new InternetAddress(myAccountEmail));
message.setRecipient(Message.RecipientType.TO, new InternetAddress(recepient));
message.setSubject(Title);
message.reply(false);
message.setText(Text);
Transport.send(message);
} catch (Exception e) {
e.printStackTrace();
}
}
}
Options that can be used in the dashboard are:
|-- project final managment.iml
|-- src
| |-- Main
| | |-- Controller.java
| | |-- Main.java
| |-- controllers
| | |-- Login
| | | |-- Login.java
| | |-- Management
| | | |-- AddNewAdmin.java
| | | |-- AddNewDiscount.java
| | | |-- Management.java
| | | |-- ShowAllAdmins.java
| | | |-- ShowAllCustomers.java
| | | |-- ShowAllDocuments.java
| | | |-- ShowAllProducts.java
| | |-- admin
| | | |-- AddNewProduct.java
| | | |-- Admin.java
| | | |-- ShowAllProductsAdmin.java
| |-- files
| | |-- data
| | | |-- adminProfiles.txt
| | | |-- discountDetails.txt
| | | |-- managementAndAdminLogin.txt
| | | |-- managementProfile.txt
| | | |-- userProfileImages.txt
| | |-- image
| | | |-- book
| | | | |-- Clean Code.jpg
| | | | |-- Death Note 1.jpg
| | | | |-- Yeni Hitit 3rd.jpg
| | | | |-- home body.jpg
| | | | |-- the words i wish i said.jpg
| | | |-- gif
| | | | |-- spinner.gif
| | | |-- gift card
| | | | |-- img-716.jpg
| | | | |-- img-719.jpg
| | | | |-- img-721.jpg
| | | | |-- img-722.jpg
| | | | |-- img-724.jpg
| | | | |-- img-727.jpg
| | | |-- icon
| | | | |-- 580b57fcd9996e24bc43c4f2.png
| | | | |-- 580b57fcd9996e24bc43c518.png
| | | | |-- 58419140a6515b1e0ad75a4c.png
| | | | |-- 5847e991cef1014c0b5e4826.png
| | | | |-- 5859902f4f6ae202fedf28d0.png
| | | | |-- 587b511a44060909aa603a81.png
| | | | |-- 587b518244060909aa603a8b.png
| | | | |-- 5a314c90cb9a85480a628f7f.png
| | | | |-- Ark-icon.png
| | | | |-- Bitcoin-BTC-icon.png
| | | | |-- Dollar-USD-icon.png
| | | | |-- Ethereum-ETH-icon.png
| | | | |-- change.png
| | | | |-- dec208a64b794e63a2dcae992d9c7f85.png
| | | | |-- icons8-account-64.png
| | | | |-- icons8-bell-48.png
| | | | |-- icons8-chart-64.png
| | | | |-- icons8-coin-63.png
| | | | |-- icons8-coin-64.png
| | | | |-- icons8-coins-64.png
| | | | |-- icons8-comment-64.png
| | | | |-- icons8-favorite-50.png
| | | | |-- icons8-favorite-60.png
| | | | |-- icons8-gift-64.png
| | | | |-- icons8-health-data-50.png
| | | | |-- icons8-home-60.png
| | | | |-- icons8-movie-ticket-48.png
| | | | |-- icons8-search-64.png
| | | | |-- icons8-settings-50.png
| | | | |-- icons8-shopping-cart-50.png
| | | | |-- icons8-star-48.png
| | | | |-- icons8-wallet-48.png
| | | | |-- instagram-logo-24.png
| | | | |-- linkedin-square-logo-24.png
| | | | |-- mainIcon.png
| | | | |-- pngfind.com-tin-man-png-6105098.png
| | | | |-- telegram-logo-24.png
| | | | |-- twitter-logo-24.png
| | | | |-- whatsapp-logo-24.png
| | | | |-- \342\200\224Pngtree\342\200\224vector location icon_4231903.png"
| | | |-- profile image
| | | | |-- Man-1-icon.png
| | | | |-- Man-14-icon.png
| | | | |-- Man-16-icon.png
| | | | |-- Man-6-icon.png
| | | | |-- Man-9-icon.png
| | | | |-- Woman-15-icon.png
| | | | |-- Woman-9-icon.png
| | | |-- service
| | | | |-- icons8-lock-100.png
| | | | |-- icons8-service-100.png
| | | | |-- icons8-truck-100.png
| |-- modules
| | |-- charts
| | | |-- LineChartData.java
| | | |-- PieChartData.java
| | |-- files
| | | |-- LoginCheck.java
| | | |-- SigninAdmin.java
| | |-- object
| | | |-- Discount.java
| | | |-- Person.java
| | | |-- Product.java
| | |-- tools
| | | |-- DigitalClock.java
| | | |-- DigitalTime.java
| | | |-- GlobalFileTools.java
| | | |-- GlobalTools.java
| | | |-- RandomData.java
| |-- pages
| | |-- admin
| | | |-- addNewProductPage.fxml
| | | |-- adminPage.fxml
| | | |-- showAllProductPage.fxml
| | |-- css
| | | |-- loginStyle.css
| | | |-- tableStyle.css
| | |-- login
| | | |-- LoginPage.fxml
| | |-- managment
| | | |-- addNewAdmin.fxml
| | | |-- addNewDiscountPage.fxml
| | | |-- managementPage.fxml
| | | |-- showAllAdminPage.fxml
| | | |-- showAllCustomerPage.fxml
| | | |-- showAllDocumentPage.fxml
| | | |-- showAllProductPage.fxml
Options that Management can be used in the dashboard are:
According to Article 165.2 of the Constitution, the taxes paid by digital and marketing companies are based on the 9% value added tax for you, with the information that we have from the company's net profit, and the calculations made on the tax result to be paid are as follows By paying taxes on time, you can also get rewards, and on the contrary, you will receive heavy fines for not paying taxes.
In the chart above, the profits that the company is supposed to make by selling the goods are drawn according to each product and its selling price.The total assets of the company, including net profit and value added, and transportation and storage costs of goods are as follows
The algorithm for calculating this number is such that it subtracts taxes and VAT from the total sales prices and gross profit, and then reduces the cost of transporting and storing goods, and finally obtains this number.
Options that Admin can be used in the dashboard are:
To delete a product, select it in the table and click the delete product button. To increase the number of goods, you can enter the number of new goods in the text field below and then click the increase goods buttonTo add a new product, you can also click the Add Product button and enter product information
:) updating
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.