├── .gitignore ├── ECommerce ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs ├── ReadMe.md └── src │ ├── .classpath │ ├── .project │ └── ECommerce │ ├── .gitignore │ ├── Main.java │ ├── business │ ├── abstracts │ │ ├── .gitignore │ │ ├── AuthService.java │ │ ├── EmailService.java │ │ └── UserService.java │ └── concretes │ │ ├── .gitignore │ │ ├── AuthManager.java │ │ ├── EmailManager.java │ │ └── UserManager.java │ ├── core │ ├── googleRegisterAdapter │ │ ├── .gitignore │ │ └── GoogleManager.java │ └── utilities │ │ ├── .gitignore │ │ └── BusinessRules.java │ ├── dataAccess │ ├── abstracts │ │ ├── .gitignore │ │ └── UserDao.java │ └── concretes │ │ ├── .gitignore │ │ └── InMemoryUserDao.java │ ├── entities │ ├── abstracts │ │ ├── .gitignore │ │ └── Entity.java │ └── concretes │ │ ├── .gitignore │ │ └── User.java │ └── signUpWithGoogle │ ├── .gitignore │ └── Register.java ├── LICENSE ├── README.md ├── frontend └── advancedJavaScript-master │ ├── .gitignore │ ├── .vscode │ └── settings.json │ ├── README.md │ ├── index.html │ ├── package-lock.json │ ├── package.json │ └── src │ ├── app.js │ ├── mapFilterReduce │ └── index.js │ ├── oop │ └── index.js │ └── restSpreadDestructure │ └── index.js ├── homeworks ├── 1.Day │ ├── .classpath │ ├── .project │ ├── homework - 1.1 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ │ └── DataTypes.java │ ├── homework - 1.2 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ │ └── ReadMe.md │ └── homework - 1.3 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ ├── Variables │ │ └── Main.java │ │ ├── arkadasSayilar │ │ └── Main.java │ │ ├── arraysDemo │ │ └── Main.java │ │ ├── conditionals │ │ └── Main.java │ │ ├── datatypes │ │ ├── Main.java │ │ └── ReadMe.md │ │ ├── helloJava │ │ └── Main.java │ │ ├── loopDemo │ │ └── Main.java │ │ ├── miniProjeAsalSayi │ │ └── Main.java │ │ ├── mukemmelSayi │ │ └── Main.java │ │ ├── multiDimensionalArrayDemo │ │ └── Main.java │ │ ├── reCapDemo1 │ │ └── Main.java │ │ ├── reCapDemo2 │ │ └── Main.java │ │ ├── sayiBulma │ │ └── Main.java │ │ ├── sesliHarfler │ │ ├── Main.java │ │ └── ReadMe.md │ │ ├── stringsDemo │ │ └── Main.java │ │ └── switchDemo │ │ └── Main.java ├── 2.Day │ ├── homework - 2.1 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ │ ├── Course.java │ │ │ ├── CourseManager.java │ │ │ ├── Instructor.java │ │ │ ├── InstructorManager.java │ │ │ ├── Main.java │ │ │ └── ReadMe.md │ └── homework - 2.2 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ ├── classes │ │ ├── CustomerManager.java │ │ ├── Main.java │ │ └── ReadMe.md │ │ ├── classesWithAttributes │ │ ├── Main.java │ │ ├── Product.java │ │ └── ProductManager.java │ │ ├── methods │ │ └── Main.java │ │ ├── methods2 │ │ └── Main.java │ │ └── reCapDemo_Classes │ │ ├── DortIslem.java │ │ └── Main.java ├── 3.Day │ ├── homework - 3.1 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ │ ├── inheritance │ │ │ ├── Customer.java │ │ │ ├── CustomerManager.java │ │ │ ├── Employee.java │ │ │ ├── EmployeeManager.java │ │ │ ├── Main.java │ │ │ ├── Person.java │ │ │ └── PersonManager.java │ │ │ ├── inheritanceDemo │ │ │ ├── AskerKrediManager.java │ │ │ ├── BaseKrediManager.java │ │ │ ├── KrediUI.java │ │ │ ├── Main.java │ │ │ ├── OgretmenKrediManager.java │ │ │ └── TarimKrediManager.java │ │ │ ├── methodOverloading │ │ │ ├── DortIslem.java │ │ │ └── Main.java │ │ │ ├── overriding │ │ │ ├── BaseCreditManager.java │ │ │ ├── Main.java │ │ │ ├── OgrenciCreditManager.java │ │ │ ├── OgretmenCreditManager.java │ │ │ └── TarimCreditManager.java │ │ │ └── polymorphismDemo │ │ │ ├── BaseLogger.java │ │ │ ├── ConsoleLogger.java │ │ │ ├── CustomerManager.java │ │ │ ├── DatabaseLogger.java │ │ │ ├── EmailLogger.java │ │ │ ├── FileLogger.java │ │ │ └── Main.java │ └── homework - 3.2 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ ├── Instructor.java │ │ ├── InstructorManager.java │ │ ├── Main.java │ │ ├── ReadMe.md │ │ ├── Student.java │ │ ├── StudentManager.java │ │ ├── User.java │ │ └── UserManager.java ├── 4.Day │ ├── homework - 4.1 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ │ ├── abstractClasses │ │ │ ├── GameCalculator.java │ │ │ ├── KidsGameCalculator.java │ │ │ ├── Main.java │ │ │ ├── ManGameCalculator.java │ │ │ ├── OlderGameCalculator.java │ │ │ └── WomanGameCalculator.java │ │ │ ├── abstractDemo │ │ │ ├── BaseDatabaseManager.java │ │ │ ├── CustomerManager.java │ │ │ ├── Main.java │ │ │ ├── MySqlDatabaseManager.java │ │ │ ├── OracleDatabaseManager.java │ │ │ └── SqlServerDatabaseManager.java │ │ │ ├── interfaceDemo │ │ │ ├── IEatable.java │ │ │ ├── IPayable.java │ │ │ ├── IWorkable.java │ │ │ ├── Main.java │ │ │ ├── OutsourceWorker.java │ │ │ ├── Robot.java │ │ │ └── Worker.java │ │ │ ├── interfaces │ │ │ ├── CustomerManager.java │ │ │ ├── ICustomerDal.java │ │ │ ├── IRepository.java │ │ │ ├── Main.java │ │ │ ├── MySqlCustomerDal.java │ │ │ └── OracleCustomerDal.java │ │ │ └── staticDemo │ │ │ ├── DatabaseHelper.java │ │ │ ├── Main.java │ │ │ ├── Product.java │ │ │ ├── ProductManager.java │ │ │ └── ProductValidator.java │ ├── homework - 4.2 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ └── src │ │ │ ├── Abstract │ │ │ ├── BaseCustomerManager.java │ │ │ ├── CustomerCheckService.java │ │ │ ├── CustomerService.java │ │ │ └── Entity.java │ │ │ ├── Concrete │ │ │ ├── CustomerCheckManager.java │ │ │ ├── NeroCustomerManager.java │ │ │ └── StarbucksCustomerManager.java │ │ │ ├── Entities │ │ │ └── Customer.java │ │ │ └── Main.java │ └── homework - 4.3 │ │ ├── .classpath │ │ ├── .gitignore │ │ ├── .project │ │ ├── ReadMe.md │ │ └── src │ │ ├── Abstract │ │ ├── CampaignService.java │ │ ├── Entity.java │ │ ├── GameService.java │ │ ├── PlayerService.java │ │ └── SaleService.java │ │ ├── Adapters │ │ └── PersonCheckService.java │ │ ├── Concrete │ │ ├── CampaignManager.java │ │ ├── FakeCheckUserService.java │ │ ├── GameManager.java │ │ ├── PlayerManager.java │ │ └── SaleManager.java │ │ ├── Entities │ │ ├── Campaign.java │ │ ├── Game.java │ │ ├── NewYearCampaign.java │ │ └── Player.java │ │ └── Main.java └── ECommerce │ ├── ReadMe.md │ ├── bin │ └── ECommerce │ │ ├── Main.class │ │ ├── business │ │ ├── abstracts │ │ │ ├── AuthService.class │ │ │ ├── EmailService.class │ │ │ └── UserService.class │ │ └── concretes │ │ │ ├── AuthManager.class │ │ │ ├── EmailManager.class │ │ │ └── UserManager.class │ │ ├── core │ │ ├── googleRegisterAdapter │ │ │ └── GoogleManager.class │ │ └── utilities │ │ │ └── BusinessRules.class │ │ ├── dataAccess │ │ ├── abstracts │ │ │ └── UserDao.class │ │ └── concretes │ │ │ └── InMemoryUserDao.class │ │ ├── entities │ │ ├── abstracts │ │ │ └── Entity.class │ │ └── concretes │ │ │ └── User.class │ │ └── signUpWithGoogle │ │ └── Register.class │ └── src │ └── ECommerce │ ├── Main.java │ ├── business │ ├── abstracts │ │ ├── AuthService.class │ │ ├── AuthService.java │ │ ├── EmailService.class │ │ ├── EmailService.java │ │ ├── UserService.class │ │ └── UserService.java │ └── concretes │ │ ├── AuthManager.class │ │ ├── AuthManager.java │ │ ├── EmailManager.class │ │ ├── EmailManager.java │ │ ├── UserManager.class │ │ └── UserManager.java │ ├── core │ ├── googleRegisterAdapter │ │ ├── GoogleManager.class │ │ └── GoogleManager.java │ └── utilities │ │ ├── BusinessRules.class │ │ └── BusinessRules.java │ ├── dataAccess │ ├── abstracts │ │ ├── UserDao.class │ │ └── UserDao.java │ └── concretes │ │ ├── InMemoryUserDao.class │ │ └── InMemoryUserDao.java │ ├── entities │ ├── abstracts │ │ ├── Entity.class │ │ └── Entity.java │ └── concretes │ │ ├── User.class │ │ └── User.java │ └── signUpWithGoogle │ ├── Register.class │ └── Register.java ├── inheritance ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs └── src │ └── inheritance │ ├── CorporateCustomer.java │ ├── Customer.java │ ├── CustomerManager.java │ ├── IndividualCustomer.java │ ├── Main.java │ ├── SendikaCustomer.java │ └── picture.jpg ├── inheritance2 ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs └── src │ └── inheritance2 │ ├── CustomerManager.java │ ├── DatabaseLogger.java │ ├── EmailLogger.java │ ├── FileLogger.java │ ├── LogManager.java │ ├── Logger.java │ ├── Main.java │ └── SmsLogger.java ├── interfaces ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs └── src │ └── interfaces │ ├── Customer.java │ ├── CustomerManager.java │ ├── DatabaseLogger.java │ ├── EmailLogger.java │ ├── FileLogger.java │ ├── Logger.java │ ├── Main.java │ ├── SmsLogger.java │ └── Utils.java ├── intro ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs └── src │ └── intro │ └── Main.java ├── nLayeredDemo ├── .classpath ├── .gitignore ├── .project ├── .settings │ └── org.eclipse.jdt.core.prefs └── src │ └── nLayeredDemo │ ├── JLogger │ └── JLoggerManager.java │ ├── Main.java │ ├── ReadMe.md │ ├── business │ ├── abstracts │ │ └── ProductService.java │ └── concretes │ │ └── ProductManager.java │ ├── core │ ├── JLoggerManagerAdapter.java │ └── LoggerService.java │ ├── dataAccess │ ├── abstracts │ │ └── ProductDao.java │ └── concretes │ │ ├── AbcProductDao.java │ │ └── HibernateProductDao.java │ └── entities │ ├── abstracts │ └── Entity.java │ └── concretes │ └── Product.java ├── northwind ├── .gitignore ├── .mvn │ └── wrapper │ │ ├── MavenWrapperDownloader.java │ │ ├── maven-wrapper.jar │ │ └── maven-wrapper.properties ├── ReadMe.md ├── mvnw ├── mvnw.cmd ├── pom.xml └── src │ ├── main │ ├── java │ │ └── kodlamaio │ │ │ └── northwind │ │ │ ├── NorthwindApplication.java │ │ │ ├── api │ │ │ ├── ProductsController.java │ │ │ └── UsersController.java │ │ │ ├── business │ │ │ ├── abstracts │ │ │ │ ├── ProductService.java │ │ │ │ └── UserService.java │ │ │ └── concretes │ │ │ │ ├── ProductManager.java │ │ │ │ └── UserManager.java │ │ │ ├── core │ │ │ ├── dataAccess │ │ │ │ └── UserDao.java │ │ │ ├── entities │ │ │ │ └── User.java │ │ │ └── utilities │ │ │ │ └── results │ │ │ │ ├── DataResult.java │ │ │ │ ├── ErrorDataResult.java │ │ │ │ ├── ErrorResult.java │ │ │ │ ├── Result.java │ │ │ │ ├── SuccessDataResult.java │ │ │ │ └── SuccessResult.java │ │ │ ├── dataAccess │ │ │ └── abstracts │ │ │ │ └── ProductDao.java │ │ │ └── entities │ │ │ ├── concretes │ │ │ ├── Category.java │ │ │ └── Product.java │ │ │ └── dtos │ │ │ └── ProductWithCategoryDto.java │ └── resources │ │ └── application.properties │ └── test │ └── java │ └── kodlamaio │ └── northwind │ └── NorthwindApplicationTests.java └── oopIntro ├── .classpath ├── .gitignore ├── .project ├── .settings └── org.eclipse.jdt.core.prefs └── src └── oopIntro ├── Category.java ├── Main.java ├── Product.java └── ProductManager.java /.gitignore: -------------------------------------------------------------------------------- 1 | /.metadata/ 2 | -------------------------------------------------------------------------------- /ECommerce/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ECommerce/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /ECommerce/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ECommerce 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /ECommerce/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /ECommerce/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## Kullanıcı Mevcut 2 | ![mevcut kullanıcı ](https://user-images.githubusercontent.com/58303745/117685031-9d8f7e80-b1c6-11eb-89ef-adeccc4d38e5.jpg)
3 | 4 | ## Bilgiler Yanlış Girilirse 5 | ![gereksinimler](https://user-images.githubusercontent.com/58303745/117685035-9e281500-b1c6-11eb-9401-7ebbc2bd0af2.jpg)
6 | 7 | ## Doğrulama kodu yanlış girilirse 8 | ![doğrulama kodu yanlış](https://user-images.githubusercontent.com/58303745/117685038-9ec0ab80-b1c6-11eb-9845-bacf559c69ed.jpg)
9 | 10 | ## Doğrulama kodu doğru girilirse 11 | ![doğrulama kodu doğru](https://user-images.githubusercontent.com/58303745/117685042-9ec0ab80-b1c6-11eb-8982-19f7f1ba4989.jpg)
12 | 13 | ## Id'ye göre getirme 14 | ![id=2 olan kullanıcı](https://user-images.githubusercontent.com/58303745/117685044-9f594200-b1c6-11eb-99e1-35390af5aef8.jpg)
15 | 16 | ## Google ile giriş 17 | ![google kayıt](https://user-images.githubusercontent.com/58303745/117685048-9ff1d880-b1c6-11eb-900a-c93cf02eb396.jpg)
18 | 19 | -------------------------------------------------------------------------------- /ECommerce/src/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /ECommerce/src/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | src 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/.gitignore: -------------------------------------------------------------------------------- 1 | /Main.class 2 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/ECommerce/src/ECommerce/Main.java -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/business/abstracts/.gitignore: -------------------------------------------------------------------------------- 1 | /AuthService.class 2 | /EmailService.class 3 | /UserService.class 4 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/business/abstracts/AuthService.java: -------------------------------------------------------------------------------- 1 | package ECommerce.business.abstracts; 2 | 3 | import ECommerce.entities.concretes.User; 4 | 5 | public interface AuthService { 6 | boolean login(User user); 7 | boolean validate(User user); 8 | } 9 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/business/abstracts/EmailService.java: -------------------------------------------------------------------------------- 1 | package ECommerce.business.abstracts; 2 | 3 | public interface EmailService { 4 | int emailSend(); 5 | } 6 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package ECommerce.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import ECommerce.entities.concretes.User; 6 | 7 | public interface UserService { 8 | void add(User user); 9 | void delete(User user); 10 | void update(User user); 11 | User get(int id); 12 | List getAll(); 13 | void userVerify(User user,int verificationCode); 14 | } 15 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/business/concretes/.gitignore: -------------------------------------------------------------------------------- 1 | /AuthManager.class 2 | /EmailManager.class 3 | /UserManager.class 4 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/business/concretes/AuthManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/ECommerce/src/ECommerce/business/concretes/AuthManager.java -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/business/concretes/EmailManager.java: -------------------------------------------------------------------------------- 1 | package ECommerce.business.concretes; 2 | 3 | import java.util.Random; 4 | 5 | import ECommerce.business.abstracts.EmailService; 6 | 7 | public class EmailManager implements EmailService { 8 | 9 | int verificationCode; 10 | public EmailManager() { 11 | Random code=new Random(); 12 | this.verificationCode=code.nextInt(1000)*10; 13 | } 14 | 15 | @Override 16 | public int emailSend() { 17 | return this.verificationCode; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/business/concretes/UserManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/ECommerce/src/ECommerce/business/concretes/UserManager.java -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/core/googleRegisterAdapter/.gitignore: -------------------------------------------------------------------------------- 1 | /GoogleManager.class 2 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/core/googleRegisterAdapter/GoogleManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/ECommerce/src/ECommerce/core/googleRegisterAdapter/GoogleManager.java -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/core/utilities/.gitignore: -------------------------------------------------------------------------------- 1 | /BusinessRules.class 2 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/core/utilities/BusinessRules.java: -------------------------------------------------------------------------------- 1 | package ECommerce.core.utilities; 2 | 3 | public class BusinessRules { 4 | public static boolean Run(boolean... logics) { 5 | for (boolean logic : logics) { 6 | if (!logic) { 7 | return false; 8 | } 9 | } 10 | return true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/dataAccess/abstracts/.gitignore: -------------------------------------------------------------------------------- 1 | /UserDao.class 2 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package ECommerce.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import ECommerce.entities.concretes.User; 6 | 7 | public interface UserDao { 8 | void add(User user); 9 | void update(User user); 10 | void delete(User user); 11 | User get(int id); 12 | List getAll(); 13 | User getEmail(String email); 14 | } 15 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/dataAccess/concretes/.gitignore: -------------------------------------------------------------------------------- 1 | /InMemoryUserDao.class 2 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/dataAccess/concretes/InMemoryUserDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/ECommerce/src/ECommerce/dataAccess/concretes/InMemoryUserDao.java -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/entities/abstracts/.gitignore: -------------------------------------------------------------------------------- 1 | /Entity.class 2 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/entities/abstracts/Entity.java: -------------------------------------------------------------------------------- 1 | package ECommerce.entities.abstracts; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/entities/concretes/.gitignore: -------------------------------------------------------------------------------- 1 | /User.class 2 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package ECommerce.entities.concretes; 2 | 3 | import ECommerce.entities.abstracts.Entity; 4 | 5 | public class User implements Entity { 6 | private int id; 7 | private String firstName; 8 | private String lastName; 9 | private String email; 10 | private String password; 11 | 12 | public User() { 13 | 14 | } 15 | 16 | public User(int id, String firstName, String lastName, String email, String password) { 17 | super(); 18 | this.id = id; 19 | this.firstName = firstName; 20 | this.lastName = lastName; 21 | this.email = email; 22 | this.password = password; 23 | } 24 | 25 | public int getId() { 26 | return id; 27 | } 28 | 29 | public void setId(int id) { 30 | this.id = id; 31 | } 32 | 33 | public String getFirstName() { 34 | return firstName; 35 | } 36 | 37 | public void setFirstName(String firstName) { 38 | this.firstName = firstName; 39 | } 40 | 41 | public String getLastName() { 42 | return lastName; 43 | } 44 | 45 | public void setLastName(String lastName) { 46 | this.lastName = lastName; 47 | } 48 | 49 | public String getEmail() { 50 | return email; 51 | } 52 | 53 | public void setEmail(String email) { 54 | this.email = email; 55 | } 56 | 57 | public String getPassword() { 58 | return password; 59 | } 60 | 61 | public void setPassword(String password) { 62 | this.password = password; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/signUpWithGoogle/.gitignore: -------------------------------------------------------------------------------- 1 | /Register.class 2 | -------------------------------------------------------------------------------- /ECommerce/src/ECommerce/signUpWithGoogle/Register.java: -------------------------------------------------------------------------------- 1 | package ECommerce.signUpWithGoogle; 2 | 3 | public class Register { 4 | public boolean register(int id,String firsName,String lastName,String email,String password){ 5 | 6 | if (firsName.length()>5 && lastName.length()>5&&email.length()>5&&password.length()>5) { 7 | return true; 8 | } 9 | return false; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Sahil Rzayev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # JavaCamp 2 | 3 | ![java giriş resmi](https://user-images.githubusercontent.com/58303745/116801369-6233e680-ab1a-11eb-9f70-070688d7d8df.jpg) 4 | --- 5 | 6 | ## Lessons 7 | 8 | 9 | Lesson 1 10 |
  • intro
  • 11 |
  • homework - 1.1
  • 12 |
  • homework - 1.2
  • 13 |
  • homework - 1.3
  • 14 | 15 | 16 | Lesson 2 17 |
  • oopIntro
  • 18 |
  • homework - 2.1
  • 19 |
  • homework - 2.2
  • 20 | 21 | Lesson 3 22 |
  • inheritance
  • 23 |
  • homework - 3.1
  • 24 |
  • homework - 3.2
  • 25 | 26 | Lesson 4 27 |
  • inheritance2
  • 28 |
  • interfaces
  • 29 |
  • homework - 4.1
  • 30 |
  • homework - 4.2
  • 31 |
  • homework - 4.3
  • 32 | 33 | Lesson 5 34 |
  • nLayeredDemo
  • 35 |
  • homework - 5.1
  • 36 | 37 | Lesson 6 38 |
  • northwind
  • 39 |
  • homework - 6.2
  • 40 | 41 | Lesson 7 42 |
  • swagger-ui
  • 43 | 44 | Lesson 8 45 |
  • northwind
  • 46 | 47 | Lesson 9 48 |
  • northwind
  • 49 | 50 | Lesson 10 51 |
  • frontend
  • 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 |

    62 |
    63 | Java Dili ve Platform Özellikleri
    64 | 65 | ![java çalışması](https://user-images.githubusercontent.com/58303745/116801430-1170bd80-ab1b-11eb-8b84-3fb932a690eb.jpg) 66 |
    67 | 68 | ![java dil ve platform özellikleri](https://user-images.githubusercontent.com/58303745/116801444-1f264300-ab1b-11eb-9e71-836c7a6cde85.jpg) 69 | 70 |
    71 | 72 | ![java dil ve platform özellikleri 1](https://user-images.githubusercontent.com/58303745/116801441-1cc3e900-ab1b-11eb-9b4a-75bb10afedc3.jpg) 73 | 74 |
    75 | 76 | ![java dil ve platform özellikleri 2](https://user-images.githubusercontent.com/58303745/116801439-1b92bc00-ab1b-11eb-928f-d578e6271edc.jpg) 77 | 78 |
    79 | 80 | ![java dil ve platform özellikleri 3](https://user-images.githubusercontent.com/58303745/116801440-1cc3e900-ab1b-11eb-8112-9235e279d6e9.jpg) 81 | 82 |
    83 | 84 | 85 |
    86 | Java Program Yaşam Döngüsü
    87 | 88 | ![program yaşam döngüsü 2](https://user-images.githubusercontent.com/58303745/116801561-2f8aed80-ab1c-11eb-8864-defd8d5a154f.jpg) 89 |
    90 | 91 | ![program yaşam döngüsü 3](https://user-images.githubusercontent.com/58303745/116801563-31ed4780-ab1c-11eb-8e23-13cb4916d8f9.jpg) 92 | 93 |
    94 | 95 | 96 |
    97 | 98 | Java Kurulumla ilgili bilgiler
    99 | 100 |
    101 | JDK nedir ve nasıl çalışır?
    102 | 103 | ![jdk nedir](https://user-images.githubusercontent.com/58303745/116801592-68c35d80-ab1c-11eb-8813-15d5986a19a7.jpg) 104 |
    105 | 106 | ![jdk neden kullanılır](https://user-images.githubusercontent.com/58303745/116801591-66f99a00-ab1c-11eb-9db4-c899d2187253.jpg) 107 |
    108 | 109 | ![jdk nasıl çalıştırılır](https://user-images.githubusercontent.com/58303745/116801589-65c86d00-ab1c-11eb-90f8-58f61a26fde4.jpg) 110 | 111 |
    112 | 113 | 114 | 115 |
    116 | JRE nedir ve nasıl çalışır?
    117 | 118 | ![jre nedir](https://user-images.githubusercontent.com/58303745/116801737-7fb67f80-ab1d-11eb-85fb-67d780650939.jpg) 119 |
    120 | 121 | ![jre neden kullanılır](https://user-images.githubusercontent.com/58303745/116801738-81804300-ab1d-11eb-9583-426a2005f205.jpg) 122 |
    123 | 124 | ![jre nasıl çalışır](https://user-images.githubusercontent.com/58303745/116801739-82b17000-ab1d-11eb-8e88-812c88c2f69a.jpg) 125 | 126 |
    127 | 128 | 129 | 130 |
    131 | JWM nedir ve nasıl çalışır?
    132 | 133 | ![jwm 1](https://user-images.githubusercontent.com/58303745/116801757-a96fa680-ab1d-11eb-9789-ba69cb0d7489.jpg) 134 |
    135 | 136 | ![jwm neden kullanılır 2](https://user-images.githubusercontent.com/58303745/116801758-aaa0d380-ab1d-11eb-9acb-9c0514827c41.jpg) 137 |
    138 | 139 | ![jwm nasıl çalışır 3](https://user-images.githubusercontent.com/58303745/116801759-abd20080-ab1d-11eb-84ae-bf41343f07c8.jpg) 140 |
    141 | 142 | ![jwm nasıl çalışır 4](https://user-images.githubusercontent.com/58303745/116801761-aeccf100-ab1d-11eb-8d14-ff61fb38f373.jpg) 143 | 144 |
    145 | 146 | 147 |
    148 | 149 | 150 | 151 | 152 |
    153 | 154 | 155 | ## License 156 | Distributed under the MIT License. See `LICENSE` for more information. 157 | -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "editor.fontSize": 14 4 | } -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/README.md: -------------------------------------------------------------------------------- 1 | # advancedJavaScript 2 | Base repository for Siemens Advanced JS Course 3 | -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | JavaScript 4 | 5 | 6 | 7 | 8 | 11 | 12 | -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jscourse", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "lite-server" 9 | }, 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "es6-module-loader": "^0.17.11", 14 | "traceur": "0.0.108" 15 | }, 16 | "devDependencies": { 17 | "lite-server": "^2.2.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/src/app.js: -------------------------------------------------------------------------------- 1 | let sayi1=10 2 | sayi1="Engin Demiroğ" 3 | let student={id:1,name:"Engin Demiroğ"} 4 | //console.log(student) 5 | 6 | function save(puan=10,ogrenci) { 7 | //console.log(ogrenci.name+" : " +puan); 8 | } 9 | 10 | save(undefined,student); 11 | // undefined ben aslında yokum diyor ve defaultunu gönderiyor 12 | 13 | 14 | let students = ["Engin Demiroğ","Halit Kalaycı","Engin Toprak","Büşra"] 15 | //console.log(students[0]) 16 | 17 | let students2 = [student,{id:2,name:"Halit"},"Ankara",{city:"İstanbul"}] 18 | //console.log(students2) 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/src/mapFilterReduce/index.js: -------------------------------------------------------------------------------- 1 | let products = [ 2 | {id:1, name : "Acer Laptop", unitPrice:15000}, 3 | {id:2, name : "Asus Laptop", unitPrice:16000}, 4 | {id:3, name : "Hp Laptop", unitPrice:13000}, 5 | {id:4, name : "Dell Laptop", unitPrice:12000}, 6 | {id:5, name : "Casper Laptop", unitPrice:17000}, 7 | ] 8 | 9 | console.log("
      ") 10 | products.map(product=>console.log(product.name)) 11 | console.log("
        ") 12 | 13 | products.map(product=>{ 14 | console.log(product) 15 | console.log(`
      • ${product.name}
      • `) 16 | }) 17 | 18 | let filteredProducts = products.filter(product=>product.unitPrice>12000) 19 | console.log(filteredProducts) 20 | 21 | let cartTotal = products.reduce((acc, product)=>acc+ product.unitPrice, 0) 22 | 23 | console.log(cartTotal) 24 | 25 | 26 | let cartTotal2 = products.filter(p=>p.unitPrice>13000).map(p=>{ 27 | p.unitPrice *= 1.18 28 | return p 29 | }) 30 | .reduce((acc,p)=>acc+p.unitPrice,0) 31 | 32 | console.log(cartTotal2) 33 | 34 | 35 | -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/src/oop/index.js: -------------------------------------------------------------------------------- 1 | class Customer{ 2 | constructor(id,customerNumber){ 3 | this.id=id 4 | this.customerNumber=customerNumber 5 | } 6 | } 7 | 8 | let customer = new Customer(1,"12345") 9 | //prototyping 10 | customer.name="Murat Kurtboğan" 11 | console.log(customer.name) 12 | 13 | Customer.bisey="Bişey" 14 | console.log(Customer.bisey) 15 | 16 | console.log(customer.customerNumber) 17 | 18 | 19 | 20 | class IndividualCustomer extends Customer{ 21 | constructor(firstName,id,customerNumber){ 22 | super(id,customerNumber) 23 | this.firstName=firstName 24 | } 25 | } 26 | 27 | class CorporateCustomer extends Customer{ 28 | constructor(companyName,id,customerNumber){ 29 | super(id,customerNumber) 30 | this.companyName=companyName 31 | } 32 | } -------------------------------------------------------------------------------- /frontend/advancedJavaScript-master/src/restSpreadDestructure/index.js: -------------------------------------------------------------------------------- 1 | // ******************** Rest - geriye kalanlar demek ******************** 2 | 3 | //params - c# daki karşılığı 4 | //varArgs - java daki karşılığı 5 | //bir değişkene fonksiyon atıya biliyoruz 6 | let showProducts=function (id,...products) { 7 | //console.log(id); 8 | //console.log(products[0][1]); 9 | } 10 | 11 | //console.log(typeof showProducts) 12 | //showProducts(10,["Elma","Armut","Karpuz"]) 13 | 14 | 15 | 16 | // ******************** Spread - ayrıştırmak ******************** 17 | 18 | let points=[1,2,3,4,50,60,14] 19 | //console.log(...points); 20 | //console.log(Math.max(...points)); // en büyük sayıyı gösterir 21 | //console.log(..."ABC","D",..."EFG","H"); 22 | 23 | 24 | 25 | 26 | // ******************** Destructuring - parçalamak ******************** 27 | 28 | //elimizdeki arrayin değerlerini değişkenlere atama yöntemi 29 | let populations = [10000,20000,30000,[40000,100000]] 30 | let [small,medium,high,[veryHigh,maximum]] = populations 31 | /*console.log(small) 32 | console.log(medium) 33 | console.log(high) 34 | console.log(veryHigh) 35 | console.log(maximum)*/ 36 | 37 | function someFunction([small1],number) { 38 | console.log(small1) 39 | } 40 | 41 | //someFunction(populations) 42 | 43 | let category = {id:1, name:"İçecek"} 44 | //console.log(category.id) 45 | //bu iki satır aynı şey 46 | //console.log(category["name"]) 47 | //console.log(category.name) 48 | 49 | let {id,name} = category 50 | console.log(id) 51 | console.log(name) 52 | -------------------------------------------------------------------------------- /homeworks/1.Day/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /homeworks/1.Day/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 1.3 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.1/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 1.1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.1/src/DataTypes.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.1/src/DataTypes.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.2/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 1.2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.2/src/ReadMe.md: -------------------------------------------------------------------------------- 1 | ![altin](https://user-images.githubusercontent.com/58303745/117512637-0b5a6100-afa1-11eb-8280-8d3a22888525.jpg) 2 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 1.3 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/Variables/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/Variables/Main.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/arkadasSayilar/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/arkadasSayilar/Main.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/arraysDemo/Main.java: -------------------------------------------------------------------------------- 1 | package arraysDemo; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | String ogrenci1 = "Engin"; 7 | String ogrenci2 = "Derin"; 8 | String ogrenci3 = "Salih"; 9 | String ogrenci4 = "Ahmet"; 10 | 11 | System.out.println(ogrenci1); 12 | System.out.println(ogrenci2); 13 | System.out.println(ogrenci3); 14 | System.out.println(ogrenci4); 15 | 16 | 17 | System.out.println("--------------"); 18 | 19 | 20 | String[] ogrenciler = new String[4]; 21 | ogrenciler[0] = "Engin"; 22 | ogrenciler[1] = "Derin"; 23 | ogrenciler[2] = "Salih"; 24 | ogrenciler[3] = "Ahmet"; 25 | //ogrenciler[4] = "Ali"; 26 | 27 | for (int i = 0; i < ogrenciler.length; i++) { 28 | System.out.println(ogrenciler[i]); 29 | } 30 | 31 | System.out.println("--------------"); 32 | 33 | for(String ogrenci:ogrenciler) { 34 | System.out.println(ogrenci); 35 | } 36 | 37 | 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/conditionals/Main.java: -------------------------------------------------------------------------------- 1 | package conditionals; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | int sayi = 20; 7 | if(sayi < 20) { 8 | System.out.println("Sayi 20den kucuktur"); 9 | }else if(sayi > 20){ 10 | System.out.println("Sayi 20den kucuk degildir"); 11 | }else { 12 | System.out.println("Sayi 20ye esittir"); 13 | } 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/datatypes/Main.java: -------------------------------------------------------------------------------- 1 | package datatypes; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | int sayi = 12; 7 | sayi = 1311111111; 8 | 9 | double sayi2 = 12.5; 10 | sayi = -129; 11 | 12 | char karakter = 'A'; 13 | 14 | boolean dogruMu = false; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/datatypes/ReadMe.md: -------------------------------------------------------------------------------- 1 | ![primitiveTypes](https://user-images.githubusercontent.com/58303745/117512879-83c12200-afa1-11eb-8bb2-720a85a7294a.jpg) 2 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/helloJava/Main.java: -------------------------------------------------------------------------------- 1 | package helloJava; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | System.out.println("Merhaba Java"); 7 | System.out.println("Merhaba Java 2"); 8 | 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/loopDemo/Main.java: -------------------------------------------------------------------------------- 1 | package loopDemo; 2 | 3 | import java.util.Iterator; 4 | 5 | public class Main { 6 | 7 | public static void main(String[] args) { 8 | 9 | // -----> For Loop <----- 10 | for (int i = 0; i < 10; i++) { 11 | System.out.println(i); 12 | } 13 | System.out.println("For dongusu bitti\n"); 14 | 15 | 16 | System.out.println("----------------------\n"); 17 | 18 | 19 | // -----> While Loop <----- 20 | int i=1; 21 | while (i<10) { 22 | System.out.println(i); 23 | i+=2; 24 | } 25 | System.out.println("While dongusu bitti\n"); 26 | 27 | 28 | System.out.println("----------------------\n"); 29 | 30 | 31 | // -----> Do-While Loop <----- 32 | int j = 1; 33 | while (j < 10) { 34 | System.out.println(j); 35 | j+=2; 36 | } 37 | System.out.println("Do-While dongusu bitti\n"); 38 | 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/miniProjeAsalSayi/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/miniProjeAsalSayi/Main.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/mukemmelSayi/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/mukemmelSayi/Main.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/multiDimensionalArrayDemo/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/multiDimensionalArrayDemo/Main.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/reCapDemo1/Main.java: -------------------------------------------------------------------------------- 1 | package reCapDemo1; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | int sayi1 = 20; 7 | int sayi2 = 25; 8 | int sayi3 = 2; 9 | int enBuyuk = sayi1; 10 | 11 | if(enBuyuk < sayi2) { 12 | enBuyuk = sayi2; 13 | } 14 | 15 | if(enBuyuk < sayi3) { 16 | enBuyuk = sayi3; 17 | } 18 | 19 | System.out.println("En buyuk = " + enBuyuk); 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/reCapDemo2/Main.java: -------------------------------------------------------------------------------- 1 | package reCapDemo2; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | double[] myList = {1.2,6.3,4.3,5.6}; 7 | double total = 0; 8 | double max = myList[0]; 9 | 10 | for (double number:myList) { 11 | if(max < number) { 12 | max = number; 13 | } 14 | total+=number; 15 | System.out.println(number); 16 | } 17 | System.out.println("Toplam : " + total); 18 | System.out.println("En buyuk : " + max); 19 | 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/sayiBulma/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/sayiBulma/Main.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/sesliHarfler/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/sesliHarfler/Main.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/sesliHarfler/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## Console 2 | ![ekranÇıktısı](https://user-images.githubusercontent.com/58303745/117512767-52e0ed00-afa1-11eb-85be-70a926964f00.jpg) 3 | -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/stringsDemo/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/stringsDemo/Main.java -------------------------------------------------------------------------------- /homeworks/1.Day/homework - 1.3/src/switchDemo/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/1.Day/homework - 1.3/src/switchDemo/Main.java -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 2.1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/src/Course.java: -------------------------------------------------------------------------------- 1 | 2 | public class Course { 3 | int id; 4 | String name; 5 | String instructor; 6 | 7 | public Course() { 8 | 9 | } 10 | 11 | public Course(int id, String name, String instructor) { 12 | super(); 13 | this.id = id; 14 | this.name = name; 15 | this.instructor = instructor; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/src/CourseManager.java: -------------------------------------------------------------------------------- 1 | 2 | public class CourseManager { 3 | 4 | public void add(Course course) { 5 | System.out.println(course.name + " - kurs eklendi"); 6 | } 7 | 8 | public void delete(Course course) { 9 | System.out.println(course.name + " - kurs eklendi"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/src/Instructor.java: -------------------------------------------------------------------------------- 1 | 2 | public class Instructor { 3 | int id; 4 | String name; 5 | String surName; 6 | 7 | public Instructor() { 8 | 9 | } 10 | 11 | public Instructor(int id, String name, String surName) { 12 | super(); 13 | this.id = id; 14 | this.name = name; 15 | this.surName = surName; 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/src/InstructorManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/2.Day/homework - 2.1/src/InstructorManager.java -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/src/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/2.Day/homework - 2.1/src/Main.java -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.1/src/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## Console görüntüsü 2 | ![ödev 2 1 ekran çıktısı](https://user-images.githubusercontent.com/58303745/117512488-c33b3e80-afa0-11eb-82fe-88a237598454.jpg) 3 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 2.2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/classes/CustomerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/2.Day/homework - 2.2/src/classes/CustomerManager.java -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/classes/Main.java: -------------------------------------------------------------------------------- 1 | package classes; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | // reference type 7 | CustomerManager customerManager = new CustomerManager(); 8 | CustomerManager customerManager2 = new CustomerManager(); 9 | customerManager = customerManager2; 10 | customerManager.Add(); 11 | customerManager.Remove(); 12 | customerManager.Update(); 13 | 14 | // value type 15 | int sayi1 = 10; 16 | int sayi2 = 20; 17 | sayi2 = sayi1; 18 | sayi1 = 30; 19 | System.out.println(sayi2); // 10 20 | 21 | int[] sayilar1 = new int[] { 1, 2, 3 }; 22 | int[] sayilar2 = new int[] { 4, 5, 6 }; 23 | sayilar2 = sayilar1; 24 | sayilar1[0] = 10; 25 | System.out.println(sayilar2[0]); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/classes/ReadMe.md: -------------------------------------------------------------------------------- 1 | ![class1](https://user-images.githubusercontent.com/58303745/117512311-6cce0000-afa0-11eb-9cc5-dca33caf8d14.jpg)
        2 | ![class2](https://user-images.githubusercontent.com/58303745/117512309-6b9cd300-afa0-11eb-89f6-6ae66a025760.jpg)
        3 | ![class3](https://user-images.githubusercontent.com/58303745/117512310-6c356980-afa0-11eb-9bcf-678ea8f8c958.jpg) 4 | 5 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/classesWithAttributes/Main.java: -------------------------------------------------------------------------------- 1 | package classesWithAttributes; 2 | import java.util.*; 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | Product product =new Product(1,"Laptop","Asus Laptop",3000,2,"Siyah"); 7 | 8 | /*Product product = new Product(); 9 | product.setName("Laptop"); 10 | product.setId(1); 11 | product.setDescription("Asus Laptop"); 12 | product.setPrice(5000); 13 | product.setStockAmount(3);*/ 14 | 15 | ProductManager productManager = new ProductManager(); 16 | productManager.Add(product); 17 | 18 | System.out.println(product.getKod()); // L1 19 | 20 | 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/classesWithAttributes/Product.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/2.Day/homework - 2.2/src/classesWithAttributes/Product.java -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/classesWithAttributes/ProductManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/2.Day/homework - 2.2/src/classesWithAttributes/ProductManager.java -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/methods/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/2.Day/homework - 2.2/src/methods/Main.java -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/methods2/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/2.Day/homework - 2.2/src/methods2/Main.java -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/reCapDemo_Classes/DortIslem.java: -------------------------------------------------------------------------------- 1 | package reCapDemo_Classes; 2 | 3 | public class DortIslem { 4 | public int Topla(int sayi1, int sayi2) { 5 | return sayi1 + sayi2; 6 | } 7 | 8 | public int Cikar(int sayi1, int sayi2) { 9 | return sayi1 - sayi2; 10 | } 11 | 12 | public int Carp(int sayi1, int sayi2) { 13 | return sayi1 * sayi2; 14 | } 15 | 16 | public int Bol(int sayi1, int sayi2) { 17 | return sayi1 / sayi2; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /homeworks/2.Day/homework - 2.2/src/reCapDemo_Classes/Main.java: -------------------------------------------------------------------------------- 1 | package reCapDemo_Classes; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | DortIslem dortIslem = new DortIslem(); 7 | int sonuc = dortIslem.Topla(3, 4); 8 | System.out.println(sonuc); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 3.1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritance/Customer.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class Customer extends Person { 4 | String email; 5 | 6 | } 7 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritance/CustomerManager.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class CustomerManager extends PersonManager { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritance/Employee.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class Employee extends Person { 4 | double salary; 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritance/EmployeeManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.1/src/inheritance/EmployeeManager.java -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritance/Main.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | Customer customer = new Customer(); 7 | Employee employee = new Employee(); 8 | 9 | EmployeeManager employeeManager = new EmployeeManager(); 10 | CustomerManager customerManager = new CustomerManager(); 11 | 12 | 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritance/Person.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class Person { 4 | int id; 5 | String firstName; 6 | String lastName; 7 | int age; 8 | } 9 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritance/PersonManager.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class PersonManager { 4 | public void List() { 5 | System.out.println("Listelendi"); 6 | } 7 | 8 | public void Add() { 9 | System.out.println("Eklendi"); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritanceDemo/AskerKrediManager.java: -------------------------------------------------------------------------------- 1 | package inheritanceDemo; 2 | 3 | public class AskerKrediManager extends BaseKrediManager { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritanceDemo/BaseKrediManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.1/src/inheritanceDemo/BaseKrediManager.java -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritanceDemo/KrediUI.java: -------------------------------------------------------------------------------- 1 | package inheritanceDemo; 2 | 3 | public class KrediUI { 4 | public void KrediHesapla(BaseKrediManager baseKrediManager) { 5 | baseKrediManager.Hesapla(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritanceDemo/Main.java: -------------------------------------------------------------------------------- 1 | package inheritanceDemo; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | // OgretmenKrediManager ogretmenKrediManager = new OgretmenKrediManager(); 7 | // ogretmenKrediManager.Hesapla(); 8 | 9 | KrediUI krediUI = new KrediUI(); 10 | krediUI.KrediHesapla(new OgretmenKrediManager()); 11 | krediUI.KrediHesapla(new TarimKrediManager()); 12 | krediUI.KrediHesapla(new AskerKrediManager()); 13 | 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritanceDemo/OgretmenKrediManager.java: -------------------------------------------------------------------------------- 1 | package inheritanceDemo; 2 | 3 | public class OgretmenKrediManager extends BaseKrediManager { 4 | } 5 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/inheritanceDemo/TarimKrediManager.java: -------------------------------------------------------------------------------- 1 | package inheritanceDemo; 2 | 3 | public class TarimKrediManager extends BaseKrediManager { 4 | } 5 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/methodOverloading/DortIslem.java: -------------------------------------------------------------------------------- 1 | package methodOverloading; 2 | 3 | public class DortIslem { 4 | public int topla(int sayi1, int sayi2) { 5 | return sayi1 + sayi2; 6 | } 7 | 8 | public int topla(int sayi1, int sayi2, int sayi3) { 9 | return sayi1 + sayi2 + sayi3; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/methodOverloading/Main.java: -------------------------------------------------------------------------------- 1 | package methodOverloading; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | DortIslem dortIslem = new DortIslem(); 7 | System.out.println(dortIslem.topla(2, 3)); 8 | dortIslem.topla(2, 3, 5); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/overriding/BaseCreditManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.1/src/overriding/BaseCreditManager.java -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/overriding/Main.java: -------------------------------------------------------------------------------- 1 | package overriding; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | // OgretmenCreditManager ogretmenCreditManager = new OgretmenCreditManager(); 7 | // System.out.println(ogretmenCreditManager.hesapla(1000)); 8 | 9 | BaseCreditManager[] creditManagers = new BaseCreditManager[] { new OgretmenCreditManager(), 10 | new TarimCreditManager(), new OgrenciCreditManager() }; 11 | 12 | for (BaseCreditManager creditManager : creditManagers) { 13 | System.out.println(creditManager.hesapla(1000)); 14 | } 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/overriding/OgrenciCreditManager.java: -------------------------------------------------------------------------------- 1 | package overriding; 2 | 3 | public class OgrenciCreditManager extends BaseCreditManager { 4 | public double hesapla(double tutar) { 5 | return tutar * 1.10; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/overriding/OgretmenCreditManager.java: -------------------------------------------------------------------------------- 1 | package overriding; 2 | 3 | public class OgretmenCreditManager extends BaseCreditManager { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/overriding/TarimCreditManager.java: -------------------------------------------------------------------------------- 1 | package overriding; 2 | 3 | public class TarimCreditManager extends BaseCreditManager { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/polymorphismDemo/BaseLogger.java: -------------------------------------------------------------------------------- 1 | package polymorphismDemo; 2 | 3 | public class BaseLogger { 4 | public void log(String message) { 5 | System.out.println("Default logger : " + message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/polymorphismDemo/ConsoleLogger.java: -------------------------------------------------------------------------------- 1 | package polymorphismDemo; 2 | 3 | public class ConsoleLogger extends BaseLogger { 4 | public void log(String message) { 5 | System.out.println("Logged to Console : " + message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/polymorphismDemo/CustomerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.1/src/polymorphismDemo/CustomerManager.java -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/polymorphismDemo/DatabaseLogger.java: -------------------------------------------------------------------------------- 1 | package polymorphismDemo; 2 | 3 | public class DatabaseLogger extends BaseLogger { 4 | public void log(String message) { 5 | System.out.println("Logged to Database : " + message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/polymorphismDemo/EmailLogger.java: -------------------------------------------------------------------------------- 1 | package polymorphismDemo; 2 | 3 | public class EmailLogger extends BaseLogger { 4 | public void log(String message) { 5 | System.out.println("Logged to Email : " + message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/polymorphismDemo/FileLogger.java: -------------------------------------------------------------------------------- 1 | package polymorphismDemo; 2 | 3 | public class FileLogger extends BaseLogger { 4 | public void log(String message) { 5 | System.out.println("Logged to File : " + message); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.1/src/polymorphismDemo/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.1/src/polymorphismDemo/Main.java -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 3.2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/src/Instructor.java: -------------------------------------------------------------------------------- 1 | 2 | public class Instructor extends User { 3 | private int salary; 4 | 5 | public Instructor(int id, String firstName, String lastName, String email, String password, int salary) { 6 | super(id, firstName, lastName, email, password); 7 | this.salary = salary; 8 | } 9 | 10 | public int getSalary() { 11 | return salary; 12 | } 13 | 14 | public void setSalary(int salary) { 15 | this.salary = salary; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/src/InstructorManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.2/src/InstructorManager.java -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/src/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.2/src/Main.java -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/src/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## Ekran çıktısı 2 | ![ekran çıktısı](https://user-images.githubusercontent.com/58303745/117512125-0ea11d00-afa0-11eb-849b-20949243673c.jpg) 3 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/src/Student.java: -------------------------------------------------------------------------------- 1 | 2 | public class Student extends User { 3 | private int studentNumber; 4 | 5 | public Student(int id, String firstName, String lastName, String email, String password, int studentNumber) { 6 | super(id, firstName, lastName, email, password); 7 | this.studentNumber = studentNumber; 8 | } 9 | 10 | public int getStudentNumber() { 11 | return studentNumber; 12 | } 13 | 14 | public void setStudentNumber(int studentNumber) { 15 | this.studentNumber = studentNumber; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/src/StudentManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.2/src/StudentManager.java -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/src/User.java: -------------------------------------------------------------------------------- 1 | 2 | public class User { 3 | private int id; 4 | private String firstName; 5 | private String lastName; 6 | private String email; 7 | private String password; 8 | 9 | public User() { 10 | 11 | } 12 | 13 | public User(int id, String firstName, String lastName, String email, String password) { 14 | super(); 15 | this.id = id; 16 | this.firstName = firstName; 17 | this.lastName = lastName; 18 | this.email = email; 19 | this.password = password; 20 | } 21 | 22 | public int getId() { 23 | return id; 24 | } 25 | 26 | public void setId(int id) { 27 | this.id = id; 28 | } 29 | 30 | public String getFirstName() { 31 | return firstName; 32 | } 33 | 34 | public void setFirstName(String firstName) { 35 | this.firstName = firstName; 36 | } 37 | 38 | public String getLastName() { 39 | return lastName; 40 | } 41 | 42 | public void setLastName(String lastName) { 43 | this.lastName = lastName; 44 | } 45 | 46 | public String getEmail() { 47 | return email; 48 | } 49 | 50 | public void setEmail(String email) { 51 | this.email = email; 52 | } 53 | 54 | public String getPassword() { 55 | return password; 56 | } 57 | 58 | public void setPassword(String password) { 59 | this.password = password; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /homeworks/3.Day/homework - 3.2/src/UserManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/3.Day/homework - 3.2/src/UserManager.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 4.1 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractClasses/GameCalculator.java: -------------------------------------------------------------------------------- 1 | package abstractClasses; 2 | 3 | public abstract class GameCalculator { 4 | public abstract void hesapla(); 5 | 6 | public final void gameOver() { 7 | System.out.println("Oyun bitti"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractClasses/KidsGameCalculator.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/abstractClasses/KidsGameCalculator.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractClasses/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/abstractClasses/Main.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractClasses/ManGameCalculator.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/abstractClasses/ManGameCalculator.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractClasses/OlderGameCalculator.java: -------------------------------------------------------------------------------- 1 | package abstractClasses; 2 | 3 | public class OlderGameCalculator extends GameCalculator { 4 | 5 | @Override 6 | public void hesapla() { 7 | // TODO Auto-generated method stub 8 | 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractClasses/WomanGameCalculator.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/abstractClasses/WomanGameCalculator.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractDemo/BaseDatabaseManager.java: -------------------------------------------------------------------------------- 1 | package abstractDemo; 2 | 3 | public abstract class BaseDatabaseManager { 4 | public abstract void getData(); 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractDemo/CustomerManager.java: -------------------------------------------------------------------------------- 1 | package abstractDemo; 2 | 3 | public class CustomerManager { 4 | 5 | BaseDatabaseManager databaseManager; 6 | 7 | public void getCustomers() { 8 | //OracleDatabaseManager oracleDatabaseManager = new OracleDatabaseManager(); 9 | databaseManager.getData(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractDemo/Main.java: -------------------------------------------------------------------------------- 1 | package abstractDemo; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | CustomerManager customerManager = new CustomerManager(); 7 | customerManager.databaseManager = new MySqlDatabaseManager(); 8 | customerManager.getCustomers(); 9 | 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractDemo/MySqlDatabaseManager.java: -------------------------------------------------------------------------------- 1 | package abstractDemo; 2 | 3 | public class MySqlDatabaseManager extends BaseDatabaseManager { 4 | 5 | @Override 6 | public void getData() { 7 | System.out.println("Veri getirildi : My sql"); 8 | 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractDemo/OracleDatabaseManager.java: -------------------------------------------------------------------------------- 1 | package abstractDemo; 2 | 3 | public class OracleDatabaseManager extends BaseDatabaseManager { 4 | 5 | @Override 6 | public void getData() { 7 | System.out.println("Veri getirildi : Oracle"); 8 | 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/abstractDemo/SqlServerDatabaseManager.java: -------------------------------------------------------------------------------- 1 | package abstractDemo; 2 | 3 | public class SqlServerDatabaseManager extends BaseDatabaseManager { 4 | 5 | @Override 6 | public void getData() { 7 | System.out.println("Veri getirildi : Sql Server"); 8 | 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaceDemo/IEatable.java: -------------------------------------------------------------------------------- 1 | package interfaceDemo; 2 | 3 | public interface IEatable { 4 | void eat(); 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaceDemo/IPayable.java: -------------------------------------------------------------------------------- 1 | package interfaceDemo; 2 | 3 | public interface IPayable { 4 | void pay(); 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaceDemo/IWorkable.java: -------------------------------------------------------------------------------- 1 | package interfaceDemo; 2 | 3 | public interface IWorkable { 4 | void work(); 5 | // mesai 6 | } 7 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaceDemo/Main.java: -------------------------------------------------------------------------------- 1 | package interfaceDemo; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | // TODO Auto-generated method stub 7 | 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaceDemo/OutsourceWorker.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/interfaceDemo/OutsourceWorker.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaceDemo/Robot.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/interfaceDemo/Robot.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaceDemo/Worker.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/interfaceDemo/Worker.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaces/CustomerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/interfaces/CustomerManager.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaces/ICustomerDal.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | public interface ICustomerDal { 4 | void add(); 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaces/IRepository.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | public interface IRepository { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaces/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/interfaces/Main.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaces/MySqlCustomerDal.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/interfaces/MySqlCustomerDal.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/interfaces/OracleCustomerDal.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | public class OracleCustomerDal implements ICustomerDal { 4 | 5 | @Override 6 | public void add() { 7 | System.out.println("Oracle eklendi"); 8 | 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/staticDemo/DatabaseHelper.java: -------------------------------------------------------------------------------- 1 | package staticDemo; 2 | 3 | public class DatabaseHelper { 4 | public static class Crud { //Create Read Update Delete 5 | public static void delete() { 6 | 7 | } 8 | 9 | public static void update() { 10 | 11 | } 12 | } 13 | 14 | public static class Connection{ 15 | public static void createConnection() { 16 | 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/staticDemo/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/staticDemo/Main.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/staticDemo/Product.java: -------------------------------------------------------------------------------- 1 | package staticDemo; 2 | 3 | public class Product { 4 | int id; 5 | String name; 6 | double price; 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/staticDemo/ProductManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/staticDemo/ProductManager.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.1/src/staticDemo/ProductValidator.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.1/src/staticDemo/ProductValidator.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 4.2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Abstract/BaseCustomerManager.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | import Entities.Customer; 4 | 5 | public abstract class BaseCustomerManager implements CustomerService { 6 | 7 | @Override 8 | public void save(Customer customer) { 9 | System.out.println("Saved to database : " + customer.getFirstName() + " " + customer.getLastName()); 10 | 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Abstract/CustomerCheckService.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | import Entities.Customer; 4 | 5 | public interface CustomerCheckService { 6 | boolean checkIfRealPerson(Customer customer); 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Abstract/CustomerService.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | import Entities.Customer; 4 | 5 | public interface CustomerService { 6 | void save(Customer customer); 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Abstract/Entity.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Concrete/CustomerCheckManager.java: -------------------------------------------------------------------------------- 1 | package Concrete; 2 | 3 | import Abstract.CustomerCheckService; 4 | import Abstract.CustomerService; 5 | import Entities.Customer; 6 | 7 | public class CustomerCheckManager implements CustomerCheckService { 8 | 9 | @Override 10 | public boolean checkIfRealPerson(Customer customer) { 11 | // TODO Auto-generated method stub 12 | return true; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Concrete/NeroCustomerManager.java: -------------------------------------------------------------------------------- 1 | package Concrete; 2 | 3 | import Abstract.BaseCustomerManager; 4 | 5 | public class NeroCustomerManager extends BaseCustomerManager { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Concrete/StarbucksCustomerManager.java: -------------------------------------------------------------------------------- 1 | package Concrete; 2 | 3 | import Abstract.BaseCustomerManager; 4 | import Abstract.CustomerCheckService; 5 | import Entities.Customer; 6 | 7 | public class StarbucksCustomerManager extends BaseCustomerManager { 8 | private CustomerCheckService customerCheckService; 9 | 10 | public StarbucksCustomerManager(CustomerCheckService customerCheckService) { 11 | super(); 12 | this.customerCheckService = customerCheckService; 13 | } 14 | 15 | @Override 16 | public void save(Customer customer) { 17 | if (customerCheckService.checkIfRealPerson(customer)) { 18 | super.save(customer); 19 | }else { 20 | System.out.println("Not a valid person"); 21 | } 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Entities/Customer.java: -------------------------------------------------------------------------------- 1 | package Entities; 2 | 3 | import java.sql.Date; 4 | 5 | import Abstract.Entity; 6 | 7 | public class Customer implements Entity { 8 | private int id; 9 | private String firstName; 10 | private String lastName; 11 | private String dateOfBirth; 12 | private String nationalityId; 13 | 14 | 15 | public Customer() { 16 | 17 | } 18 | 19 | 20 | 21 | public Customer(int id, String firstName, String lastName, String dateOfBirth, String nationalityId) { 22 | super(); 23 | this.id = id; 24 | this.firstName = firstName; 25 | this.lastName = lastName; 26 | this.dateOfBirth = dateOfBirth; 27 | this.nationalityId = nationalityId; 28 | } 29 | 30 | 31 | 32 | public int getId() { 33 | return id; 34 | } 35 | public void setId(int id) { 36 | this.id = id; 37 | } 38 | public String getFirstName() { 39 | return firstName; 40 | } 41 | public void setFirstName(String firstName) { 42 | this.firstName = firstName; 43 | } 44 | public String getLastName() { 45 | return lastName; 46 | } 47 | public void setLastName(String lastName) { 48 | this.lastName = lastName; 49 | } 50 | public String getDateOfBirth() { 51 | return dateOfBirth; 52 | } 53 | public void setDateOfBirth(String dateOfBirth) { 54 | this.dateOfBirth = dateOfBirth; 55 | } 56 | public String getNationalityId() { 57 | return nationalityId; 58 | } 59 | public void setNationalityId(String nationalityId) { 60 | this.nationalityId = nationalityId; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.2/src/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.2/src/Main.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | homework - 4.3 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## Kullanıcı ekleme-silme-güncelleme 2 | ![Kullanıcı ](https://user-images.githubusercontent.com/58303745/117511701-3fcd1d80-af9f-11eb-9117-246b9b14ad75.jpg) 3 | 4 | ## Oyun ekleme-silme-güncelleme 5 | ![Oyun](https://user-images.githubusercontent.com/58303745/117511791-668b5400-af9f-11eb-8091-dbd0b0593d62.jpg) 6 | 7 | ## Kampanya ekleme-silme-güncelleme 8 | ![Kampanya](https://user-images.githubusercontent.com/58303745/117511885-989cb600-af9f-11eb-90e8-c47c95d1008c.jpg) 9 | 10 | ## Satış(kampanya kullanılarak) 11 | ![Satış](https://user-images.githubusercontent.com/58303745/117511835-828ef580-af9f-11eb-8b14-feeb29aa1c1e.jpg) 12 | 13 | ## Satış(kampanyasız) 14 | ![Satış2](https://user-images.githubusercontent.com/58303745/117511862-8de22100-af9f-11eb-904b-73906643bde0.jpg) 15 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Abstract/CampaignService.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | import Entities.Campaign; 4 | 5 | public interface CampaignService { 6 | void add(Campaign campaign); 7 | void update(Campaign campaign); 8 | void delete(Campaign campaign); 9 | } 10 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Abstract/Entity.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Abstract/GameService.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | import Entities.Game; 4 | 5 | public interface GameService { 6 | void add(Game game); 7 | 8 | void update(Game game); 9 | 10 | void delete(Game game); 11 | } 12 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Abstract/PlayerService.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | import Entities.Player; 4 | 5 | public interface PlayerService { 6 | void add(Player player); 7 | void update(Player player); 8 | void delete(Player player); 9 | } 10 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Abstract/SaleService.java: -------------------------------------------------------------------------------- 1 | package Abstract; 2 | 3 | import Entities.Campaign; 4 | import Entities.Game; 5 | import Entities.Player; 6 | 7 | public interface SaleService { 8 | void saleGame(Player player,Game game); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Adapters/PersonCheckService.java: -------------------------------------------------------------------------------- 1 | package Adapters; 2 | 3 | import Entities.Player; 4 | 5 | public interface PersonCheckService { 6 | boolean validation(Player player); 7 | } 8 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Concrete/CampaignManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.3/src/Concrete/CampaignManager.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Concrete/FakeCheckUserService.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.3/src/Concrete/FakeCheckUserService.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Concrete/GameManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.3/src/Concrete/GameManager.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Concrete/PlayerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.3/src/Concrete/PlayerManager.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Concrete/SaleManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.3/src/Concrete/SaleManager.java -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Entities/Campaign.java: -------------------------------------------------------------------------------- 1 | package Entities; 2 | 3 | import Abstract.Entity; 4 | 5 | public class Campaign implements Entity{ 6 | private int id; 7 | private String name; 8 | private int discount; 9 | 10 | public Campaign() { 11 | 12 | } 13 | 14 | public Campaign(int id, String name, int discount) { 15 | super(); 16 | this.id = id; 17 | this.name = name; 18 | this.discount = discount; 19 | } 20 | 21 | public int getId() { 22 | return id; 23 | } 24 | 25 | public void setId(int id) { 26 | this.id = id; 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public void setName(String name) { 34 | this.name = name; 35 | } 36 | 37 | public int getDiscount() { 38 | return discount; 39 | } 40 | 41 | public void setDiscount(int discount) { 42 | this.discount = discount; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Entities/Game.java: -------------------------------------------------------------------------------- 1 | package Entities; 2 | 3 | import Abstract.Entity; 4 | 5 | public class Game implements Entity { 6 | private int id; 7 | private String name; 8 | private String category; 9 | private double price; 10 | Campaign campaign; 11 | 12 | public Game() { 13 | 14 | } 15 | 16 | public Game(int id, String name, String category, double price, Campaign campaign) { 17 | super(); 18 | this.id = id; 19 | this.name = name; 20 | this.category = category; 21 | this.price = price; 22 | this.campaign = campaign; 23 | } 24 | 25 | public Game(int id, String name, String category, double price) { 26 | super(); 27 | this.id = id; 28 | this.name = name; 29 | this.category = category; 30 | this.price = price; 31 | } 32 | 33 | public int getId() { 34 | return id; 35 | } 36 | 37 | public void setId(int id) { 38 | this.id = id; 39 | } 40 | 41 | public String getName() { 42 | return name; 43 | } 44 | 45 | public void setName(String name) { 46 | this.name = name; 47 | } 48 | 49 | public String getCategory() { 50 | return category; 51 | } 52 | 53 | public void setCategory(String category) { 54 | this.category = category; 55 | } 56 | 57 | public double getPrice() { 58 | return price; 59 | } 60 | 61 | public void setPrice(double price) { 62 | this.price = price; 63 | } 64 | 65 | public Campaign getCampaign() { 66 | return campaign; 67 | } 68 | 69 | public void setCampaign(Campaign campaign) { 70 | this.campaign = campaign; 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Entities/NewYearCampaign.java: -------------------------------------------------------------------------------- 1 | package Entities; 2 | 3 | public class NewYearCampaign extends Campaign { 4 | 5 | public NewYearCampaign() { 6 | super.setDiscount(50); 7 | } 8 | 9 | public NewYearCampaign(int id, String name, int discount) { 10 | super(id, name, discount); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Entities/Player.java: -------------------------------------------------------------------------------- 1 | package Entities; 2 | 3 | import Abstract.Entity; 4 | 5 | public class Player implements Entity{ 6 | private int id; 7 | private String name; 8 | private String surname; 9 | private String nationalityId; 10 | private String dateOfBirth; 11 | 12 | public Player() { 13 | 14 | } 15 | 16 | public Player(int id, String name, String surname, String nationalityId, String dateOfBirth) { 17 | super(); 18 | this.id = id; 19 | this.name = name; 20 | this.surname = surname; 21 | this.nationalityId = nationalityId; 22 | this.dateOfBirth = dateOfBirth; 23 | } 24 | 25 | public int getId() { 26 | return id; 27 | } 28 | public void setId(int id) { 29 | this.id = id; 30 | } 31 | public String getName() { 32 | return name; 33 | } 34 | public void setName(String name) { 35 | this.name = name; 36 | } 37 | public String getSurname() { 38 | return surname; 39 | } 40 | public void setSurname(String surname) { 41 | this.surname = surname; 42 | } 43 | public String getNationalityId() { 44 | return nationalityId; 45 | } 46 | public void setNationalityId(String nationalityId) { 47 | this.nationalityId = nationalityId; 48 | } 49 | public String getDateOfBirth() { 50 | return dateOfBirth; 51 | } 52 | public void setDateOfBirth(String dateOfBirth) { 53 | this.dateOfBirth = dateOfBirth; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /homeworks/4.Day/homework - 4.3/src/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/4.Day/homework - 4.3/src/Main.java -------------------------------------------------------------------------------- /homeworks/ECommerce/ReadMe.md: -------------------------------------------------------------------------------- 1 | ## Kullanıcı Mevcut 2 | ![mevcut kullanıcı ](https://user-images.githubusercontent.com/58303745/117685031-9d8f7e80-b1c6-11eb-89ef-adeccc4d38e5.jpg)
        3 | 4 | ## Bilgiler Yanlış Girilirse 5 | ![gereksinimler](https://user-images.githubusercontent.com/58303745/117685035-9e281500-b1c6-11eb-9401-7ebbc2bd0af2.jpg)
        6 | 7 | ## Doğrulama kodu yanlış girilirse 8 | ![doğrulama kodu yanlış](https://user-images.githubusercontent.com/58303745/117685038-9ec0ab80-b1c6-11eb-9845-bacf559c69ed.jpg)
        9 | 10 | ## Doğrulama kodu doğru girilirse 11 | ![doğrulama kodu doğru](https://user-images.githubusercontent.com/58303745/117685042-9ec0ab80-b1c6-11eb-8982-19f7f1ba4989.jpg)
        12 | 13 | ## Id'ye göre getirme 14 | ![id=2 olan kullanıcı](https://user-images.githubusercontent.com/58303745/117685044-9f594200-b1c6-11eb-99e1-35390af5aef8.jpg)
        15 | 16 | ## Google ile giriş 17 | ![google kayıt](https://user-images.githubusercontent.com/58303745/117685048-9ff1d880-b1c6-11eb-900a-c93cf02eb396.jpg)
        18 | 19 | -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/Main.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/Main.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/business/abstracts/AuthService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/business/abstracts/AuthService.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/business/abstracts/EmailService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/business/abstracts/EmailService.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/business/abstracts/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/business/abstracts/UserService.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/business/concretes/AuthManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/business/concretes/AuthManager.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/business/concretes/EmailManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/business/concretes/EmailManager.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/business/concretes/UserManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/business/concretes/UserManager.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/core/googleRegisterAdapter/GoogleManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/core/googleRegisterAdapter/GoogleManager.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/core/utilities/BusinessRules.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/core/utilities/BusinessRules.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/dataAccess/abstracts/UserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/dataAccess/abstracts/UserDao.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/dataAccess/concretes/InMemoryUserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/dataAccess/concretes/InMemoryUserDao.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/entities/abstracts/Entity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/entities/abstracts/Entity.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/entities/concretes/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/entities/concretes/User.class -------------------------------------------------------------------------------- /homeworks/ECommerce/bin/ECommerce/signUpWithGoogle/Register.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/bin/ECommerce/signUpWithGoogle/Register.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/Main.java -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/abstracts/AuthService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/business/abstracts/AuthService.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/abstracts/AuthService.java: -------------------------------------------------------------------------------- 1 | package ECommerce.business.abstracts; 2 | 3 | import ECommerce.entities.concretes.User; 4 | 5 | public interface AuthService { 6 | boolean login(User user); 7 | boolean validate(User user); 8 | } 9 | -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/abstracts/EmailService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/business/abstracts/EmailService.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/abstracts/EmailService.java: -------------------------------------------------------------------------------- 1 | package ECommerce.business.abstracts; 2 | 3 | public interface EmailService { 4 | int emailSend(); 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/abstracts/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/business/abstracts/UserService.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package ECommerce.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import ECommerce.entities.concretes.User; 6 | 7 | public interface UserService { 8 | void add(User user); 9 | void delete(User user); 10 | void update(User user); 11 | User get(int id); 12 | List getAll(); 13 | void userVerify(User user,int verificationCode); 14 | } 15 | -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/concretes/AuthManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/business/concretes/AuthManager.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/concretes/AuthManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/business/concretes/AuthManager.java -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/concretes/EmailManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/business/concretes/EmailManager.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/concretes/EmailManager.java: -------------------------------------------------------------------------------- 1 | package ECommerce.business.concretes; 2 | 3 | import java.util.Random; 4 | 5 | import ECommerce.business.abstracts.EmailService; 6 | 7 | public class EmailManager implements EmailService { 8 | 9 | int verificationCode; 10 | public EmailManager() { 11 | Random code=new Random(); 12 | this.verificationCode=code.nextInt(1000)*10; 13 | } 14 | 15 | @Override 16 | public int emailSend() { 17 | return this.verificationCode; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/concretes/UserManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/business/concretes/UserManager.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/business/concretes/UserManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/business/concretes/UserManager.java -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/core/googleRegisterAdapter/GoogleManager.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/core/googleRegisterAdapter/GoogleManager.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/core/googleRegisterAdapter/GoogleManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/core/googleRegisterAdapter/GoogleManager.java -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/core/utilities/BusinessRules.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/core/utilities/BusinessRules.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/core/utilities/BusinessRules.java: -------------------------------------------------------------------------------- 1 | package ECommerce.core.utilities; 2 | 3 | public class BusinessRules { 4 | public static boolean Run(boolean... logics) { 5 | for (boolean logic : logics) { 6 | if (!logic) { 7 | return false; 8 | } 9 | } 10 | return true; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/dataAccess/abstracts/UserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/dataAccess/abstracts/UserDao.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/dataAccess/abstracts/UserDao.java: -------------------------------------------------------------------------------- 1 | package ECommerce.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import ECommerce.entities.concretes.User; 6 | 7 | public interface UserDao { 8 | void add(User user); 9 | void update(User user); 10 | void delete(User user); 11 | User get(int id); 12 | List getAll(); 13 | User getEmail(String email); 14 | } 15 | -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/dataAccess/concretes/InMemoryUserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/dataAccess/concretes/InMemoryUserDao.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/dataAccess/concretes/InMemoryUserDao.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/dataAccess/concretes/InMemoryUserDao.java -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/entities/abstracts/Entity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/entities/abstracts/Entity.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/entities/abstracts/Entity.java: -------------------------------------------------------------------------------- 1 | package ECommerce.entities.abstracts; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/entities/concretes/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/entities/concretes/User.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/entities/concretes/User.java: -------------------------------------------------------------------------------- 1 | package ECommerce.entities.concretes; 2 | 3 | import ECommerce.entities.abstracts.Entity; 4 | 5 | public class User implements Entity { 6 | private int id; 7 | private String firstName; 8 | private String lastName; 9 | private String email; 10 | private String password; 11 | 12 | public User() { 13 | 14 | } 15 | 16 | public User(int id, String firstName, String lastName, String email, String password) { 17 | super(); 18 | this.id = id; 19 | this.firstName = firstName; 20 | this.lastName = lastName; 21 | this.email = email; 22 | this.password = password; 23 | } 24 | 25 | public int getId() { 26 | return id; 27 | } 28 | 29 | public void setId(int id) { 30 | this.id = id; 31 | } 32 | 33 | public String getFirstName() { 34 | return firstName; 35 | } 36 | 37 | public void setFirstName(String firstName) { 38 | this.firstName = firstName; 39 | } 40 | 41 | public String getLastName() { 42 | return lastName; 43 | } 44 | 45 | public void setLastName(String lastName) { 46 | this.lastName = lastName; 47 | } 48 | 49 | public String getEmail() { 50 | return email; 51 | } 52 | 53 | public void setEmail(String email) { 54 | this.email = email; 55 | } 56 | 57 | public String getPassword() { 58 | return password; 59 | } 60 | 61 | public void setPassword(String password) { 62 | this.password = password; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/signUpWithGoogle/Register.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/homeworks/ECommerce/src/ECommerce/signUpWithGoogle/Register.class -------------------------------------------------------------------------------- /homeworks/ECommerce/src/ECommerce/signUpWithGoogle/Register.java: -------------------------------------------------------------------------------- 1 | package ECommerce.signUpWithGoogle; 2 | 3 | public class Register { 4 | public boolean register(int id,String firsName,String lastName,String email,String password){ 5 | 6 | if (firsName.length()>5 && lastName.length()>5&&email.length()>5&&password.length()>5) { 7 | return true; 8 | } 9 | return false; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /inheritance/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /inheritance/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /inheritance/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | inheritance 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /inheritance/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /inheritance/src/inheritance/CorporateCustomer.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class CorporateCustomer extends Customer { 4 | String companyName; 5 | String taxNumber; 6 | } 7 | -------------------------------------------------------------------------------- /inheritance/src/inheritance/Customer.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class Customer { 4 | int id; 5 | String customerNumber; 6 | } 7 | //base/super -------------------------------------------------------------------------------- /inheritance/src/inheritance/CustomerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/inheritance/src/inheritance/CustomerManager.java -------------------------------------------------------------------------------- /inheritance/src/inheritance/IndividualCustomer.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class IndividualCustomer extends Customer { 4 | String firstName; 5 | String lastName; 6 | String nationalIdentity; 7 | } 8 | -------------------------------------------------------------------------------- /inheritance/src/inheritance/Main.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | 7 | IndividualCustomer engin = new IndividualCustomer(); 8 | engin.customerNumber = "12345"; 9 | 10 | CorporateCustomer hepsiBurada = new CorporateCustomer(); 11 | hepsiBurada.customerNumber = "78910"; 12 | 13 | SendikaCustomer abc = new SendikaCustomer(); 14 | abc.customerNumber = "99999"; 15 | 16 | CustomerManager customerManager = new CustomerManager(); 17 | /*customerManager.add(hepsiBurada); 18 | customerManager.add(engin); 19 | customerManager.add(abc);*/ 20 | 21 | Customer[] customers = {engin, abc, hepsiBurada}; 22 | customerManager.addMultiple(customers); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /inheritance/src/inheritance/SendikaCustomer.java: -------------------------------------------------------------------------------- 1 | package inheritance; 2 | 3 | public class SendikaCustomer extends Customer{ 4 | String sendikaBiseyi; 5 | } 6 | -------------------------------------------------------------------------------- /inheritance/src/inheritance/picture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/inheritance/src/inheritance/picture.jpg -------------------------------------------------------------------------------- /inheritance2/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /inheritance2/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /inheritance2/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | inheritance2 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /inheritance2/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /inheritance2/src/inheritance2/CustomerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/inheritance2/src/inheritance2/CustomerManager.java -------------------------------------------------------------------------------- /inheritance2/src/inheritance2/DatabaseLogger.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/inheritance2/src/inheritance2/DatabaseLogger.java -------------------------------------------------------------------------------- /inheritance2/src/inheritance2/EmailLogger.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/inheritance2/src/inheritance2/EmailLogger.java -------------------------------------------------------------------------------- /inheritance2/src/inheritance2/FileLogger.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/inheritance2/src/inheritance2/FileLogger.java -------------------------------------------------------------------------------- /inheritance2/src/inheritance2/LogManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/inheritance2/src/inheritance2/LogManager.java -------------------------------------------------------------------------------- /inheritance2/src/inheritance2/Logger.java: -------------------------------------------------------------------------------- 1 | package inheritance2; 2 | 3 | public class Logger { 4 | public void log() { 5 | System.out.println("Ortak konfigurasyon"); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /inheritance2/src/inheritance2/Main.java: -------------------------------------------------------------------------------- 1 | package inheritance2; 2 | 3 | public class Main { 4 | 5 | public static void main(String[] args) { 6 | 7 | CustomerManager customerManager = new CustomerManager(); 8 | customerManager.add(new EmailLogger()); 9 | 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /inheritance2/src/inheritance2/SmsLogger.java: -------------------------------------------------------------------------------- 1 | package inheritance2; 2 | 3 | public class SmsLogger extends Logger{ 4 | 5 | } 6 | -------------------------------------------------------------------------------- /interfaces/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /interfaces/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /interfaces/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | interfaces 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /interfaces/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /interfaces/src/interfaces/Customer.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | public class Customer { 4 | private int id; 5 | private String firstName; 6 | private String lastName; 7 | 8 | public Customer() { 9 | 10 | } 11 | 12 | public Customer(int id, String firstName, String lastName) { 13 | super(); 14 | this.id = id; 15 | this.firstName = firstName; 16 | this.lastName = lastName; 17 | } 18 | 19 | public int getId() { 20 | return id; 21 | } 22 | 23 | public void setId(int id) { 24 | this.id = id; 25 | } 26 | 27 | public String getFirstName() { 28 | return firstName; 29 | } 30 | 31 | public void setFirstName(String firstName) { 32 | this.firstName = firstName; 33 | } 34 | 35 | public String getLastName() { 36 | return lastName; 37 | } 38 | 39 | public void setLastName(String lastName) { 40 | this.lastName = lastName; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /interfaces/src/interfaces/CustomerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/interfaces/src/interfaces/CustomerManager.java -------------------------------------------------------------------------------- /interfaces/src/interfaces/DatabaseLogger.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/interfaces/src/interfaces/DatabaseLogger.java -------------------------------------------------------------------------------- /interfaces/src/interfaces/EmailLogger.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/interfaces/src/interfaces/EmailLogger.java -------------------------------------------------------------------------------- /interfaces/src/interfaces/FileLogger.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/interfaces/src/interfaces/FileLogger.java -------------------------------------------------------------------------------- /interfaces/src/interfaces/Logger.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | public interface Logger { 4 | void log(String message); 5 | } 6 | -------------------------------------------------------------------------------- /interfaces/src/interfaces/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/interfaces/src/interfaces/Main.java -------------------------------------------------------------------------------- /interfaces/src/interfaces/SmsLogger.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/interfaces/src/interfaces/SmsLogger.java -------------------------------------------------------------------------------- /interfaces/src/interfaces/Utils.java: -------------------------------------------------------------------------------- 1 | package interfaces; 2 | 3 | public class Utils { 4 | public static void runLoggers(Logger[] loggers, String message) { 5 | for (Logger logger : loggers) { 6 | logger.log(message); 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /intro/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /intro/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /intro/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | intro 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /intro/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /intro/src/intro/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/intro/src/intro/Main.java -------------------------------------------------------------------------------- /nLayeredDemo/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /nLayeredDemo/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /nLayeredDemo/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | nLayeredDemo 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /nLayeredDemo/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/JLogger/JLoggerManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/nLayeredDemo/src/nLayeredDemo/JLogger/JLoggerManager.java -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/nLayeredDemo/src/nLayeredDemo/Main.java -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/ReadMe.md: -------------------------------------------------------------------------------- 1 | ![5 ders](https://user-images.githubusercontent.com/58303745/117712475-71372a80-b1e5-11eb-9234-05d99aaa26d8.jpg) 2 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/business/abstracts/ProductService.java: -------------------------------------------------------------------------------- 1 | package nLayeredDemo.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import nLayeredDemo.entities.concretes.Product; 6 | 7 | public interface ProductService { 8 | void add(Product product); 9 | List getAll(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/business/concretes/ProductManager.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/nLayeredDemo/src/nLayeredDemo/business/concretes/ProductManager.java -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/core/JLoggerManagerAdapter.java: -------------------------------------------------------------------------------- 1 | package nLayeredDemo.core; 2 | 3 | import nLayeredDemo.JLogger.JLoggerManager; 4 | 5 | public class JLoggerManagerAdapter implements LoggerService { 6 | 7 | @Override 8 | public void logToSystem(String message) { 9 | JLoggerManager manager = new JLoggerManager(); 10 | manager.log(message); 11 | 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/core/LoggerService.java: -------------------------------------------------------------------------------- 1 | package nLayeredDemo.core; 2 | 3 | public interface LoggerService { 4 | void logToSystem(String message); 5 | } 6 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/dataAccess/abstracts/ProductDao.java: -------------------------------------------------------------------------------- 1 | package nLayeredDemo.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import nLayeredDemo.entities.concretes.Product; 6 | 7 | public interface ProductDao { 8 | void add(Product product); 9 | void update(Product product); 10 | void delete(Product product); 11 | Product get(int id); 12 | List getAll(); 13 | } 14 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/dataAccess/concretes/AbcProductDao.java: -------------------------------------------------------------------------------- 1 | package nLayeredDemo.dataAccess.concretes; 2 | 3 | import java.util.List; 4 | 5 | import nLayeredDemo.dataAccess.abstracts.ProductDao; 6 | import nLayeredDemo.entities.concretes.Product; 7 | 8 | public class AbcProductDao implements ProductDao { 9 | 10 | @Override 11 | public void add(Product product) { 12 | System.out.println("Abc ile eklendi " + product.getName()); 13 | 14 | } 15 | 16 | @Override 17 | public void update(Product product) { 18 | // TODO Auto-generated method stub 19 | 20 | } 21 | 22 | @Override 23 | public void delete(Product product) { 24 | // TODO Auto-generated method stub 25 | 26 | } 27 | 28 | @Override 29 | public Product get(int id) { 30 | // TODO Auto-generated method stub 31 | return null; 32 | } 33 | 34 | @Override 35 | public List getAll() { 36 | // TODO Auto-generated method stub 37 | return null; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/dataAccess/concretes/HibernateProductDao.java: -------------------------------------------------------------------------------- 1 | package nLayeredDemo.dataAccess.concretes; 2 | 3 | import java.util.List; 4 | 5 | import nLayeredDemo.dataAccess.abstracts.ProductDao; 6 | import nLayeredDemo.entities.concretes.Product; 7 | 8 | public class HibernateProductDao implements ProductDao { 9 | 10 | @Override 11 | public void add(Product product) { 12 | System.out.println("Hibernate ile eklendi " + product.getName()); 13 | 14 | } 15 | 16 | @Override 17 | public void update(Product product) { 18 | // TODO Auto-generated method stub 19 | 20 | } 21 | 22 | @Override 23 | public void delete(Product product) { 24 | // TODO Auto-generated method stub 25 | 26 | } 27 | 28 | @Override 29 | public Product get(int id) { 30 | // TODO Auto-generated method stub 31 | return null; 32 | } 33 | 34 | @Override 35 | public List getAll() { 36 | // TODO Auto-generated method stub 37 | return null; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/entities/abstracts/Entity.java: -------------------------------------------------------------------------------- 1 | package nLayeredDemo.entities.abstracts; 2 | 3 | public interface Entity { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /nLayeredDemo/src/nLayeredDemo/entities/concretes/Product.java: -------------------------------------------------------------------------------- 1 | package nLayeredDemo.entities.concretes; 2 | 3 | import nLayeredDemo.entities.abstracts.Entity; 4 | 5 | public class Product implements Entity { 6 | private int id; 7 | private int categoryId; 8 | private String name; 9 | private double unitPrice; 10 | private int unitsInStock; 11 | 12 | public Product() { 13 | 14 | } 15 | 16 | public Product(int id, int categoryId, String name, double unitPrice, int unitsInStock) { 17 | super(); 18 | this.id = id; 19 | this.categoryId = categoryId; 20 | this.name = name; 21 | this.unitPrice = unitPrice; 22 | this.unitsInStock = unitsInStock; 23 | } 24 | 25 | public int getId() { 26 | return id; 27 | } 28 | 29 | public void setId(int id) { 30 | this.id = id; 31 | } 32 | 33 | public int getCategoryId() { 34 | return categoryId; 35 | } 36 | 37 | public void setCategoryId(int categoryId) { 38 | this.categoryId = categoryId; 39 | } 40 | 41 | public String getName() { 42 | return name; 43 | } 44 | 45 | public void setName(String name) { 46 | this.name = name; 47 | } 48 | 49 | public double getUnitPrice() { 50 | return unitPrice; 51 | } 52 | 53 | public void setUnitPrice(double unitPrice) { 54 | this.unitPrice = unitPrice; 55 | } 56 | 57 | public int getUnitsInStock() { 58 | return unitsInStock; 59 | } 60 | 61 | public void setUnitsInStock(int unitsInStock) { 62 | this.unitsInStock = unitsInStock; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /northwind/.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /northwind/.mvn/wrapper/MavenWrapperDownloader.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2007-present the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | import java.net.*; 17 | import java.io.*; 18 | import java.nio.channels.*; 19 | import java.util.Properties; 20 | 21 | public class MavenWrapperDownloader { 22 | 23 | private static final String WRAPPER_VERSION = "0.5.6"; 24 | /** 25 | * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. 26 | */ 27 | private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" 28 | + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; 29 | 30 | /** 31 | * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to 32 | * use instead of the default one. 33 | */ 34 | private static final String MAVEN_WRAPPER_PROPERTIES_PATH = 35 | ".mvn/wrapper/maven-wrapper.properties"; 36 | 37 | /** 38 | * Path where the maven-wrapper.jar will be saved to. 39 | */ 40 | private static final String MAVEN_WRAPPER_JAR_PATH = 41 | ".mvn/wrapper/maven-wrapper.jar"; 42 | 43 | /** 44 | * Name of the property which should be used to override the default download url for the wrapper. 45 | */ 46 | private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; 47 | 48 | public static void main(String args[]) { 49 | System.out.println("- Downloader started"); 50 | File baseDirectory = new File(args[0]); 51 | System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); 52 | 53 | // If the maven-wrapper.properties exists, read it and check if it contains a custom 54 | // wrapperUrl parameter. 55 | File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); 56 | String url = DEFAULT_DOWNLOAD_URL; 57 | if(mavenWrapperPropertyFile.exists()) { 58 | FileInputStream mavenWrapperPropertyFileInputStream = null; 59 | try { 60 | mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); 61 | Properties mavenWrapperProperties = new Properties(); 62 | mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); 63 | url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); 64 | } catch (IOException e) { 65 | System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); 66 | } finally { 67 | try { 68 | if(mavenWrapperPropertyFileInputStream != null) { 69 | mavenWrapperPropertyFileInputStream.close(); 70 | } 71 | } catch (IOException e) { 72 | // Ignore ... 73 | } 74 | } 75 | } 76 | System.out.println("- Downloading from: " + url); 77 | 78 | File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); 79 | if(!outputFile.getParentFile().exists()) { 80 | if(!outputFile.getParentFile().mkdirs()) { 81 | System.out.println( 82 | "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); 83 | } 84 | } 85 | System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); 86 | try { 87 | downloadFileFromURL(url, outputFile); 88 | System.out.println("Done"); 89 | System.exit(0); 90 | } catch (Throwable e) { 91 | System.out.println("- Error downloading"); 92 | e.printStackTrace(); 93 | System.exit(1); 94 | } 95 | } 96 | 97 | private static void downloadFileFromURL(String urlString, File destination) throws Exception { 98 | if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { 99 | String username = System.getenv("MVNW_USERNAME"); 100 | char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); 101 | Authenticator.setDefault(new Authenticator() { 102 | @Override 103 | protected PasswordAuthentication getPasswordAuthentication() { 104 | return new PasswordAuthentication(username, password); 105 | } 106 | }); 107 | } 108 | URL website = new URL(urlString); 109 | ReadableByteChannel rbc; 110 | rbc = Channels.newChannel(website.openStream()); 111 | FileOutputStream fos = new FileOutputStream(destination); 112 | fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); 113 | fos.close(); 114 | rbc.close(); 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /northwind/.mvn/wrapper/maven-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/northwind/.mvn/wrapper/maven-wrapper.jar -------------------------------------------------------------------------------- /northwind/.mvn/wrapper/maven-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip 2 | wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar 3 | -------------------------------------------------------------------------------- /northwind/ReadMe.md: -------------------------------------------------------------------------------- 1 | ![image](https://user-images.githubusercontent.com/58303745/117555162-dff17800-b06d-11eb-8b9c-642f6ab31354.png) 2 | -------------------------------------------------------------------------------- /northwind/mvnw: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ---------------------------------------------------------------------------- 3 | # Licensed to the Apache Software Foundation (ASF) under one 4 | # or more contributor license agreements. See the NOTICE file 5 | # distributed with this work for additional information 6 | # regarding copyright ownership. The ASF licenses this file 7 | # to you under the Apache License, Version 2.0 (the 8 | # "License"); you may not use this file except in compliance 9 | # with the License. You may obtain a copy of the License at 10 | # 11 | # https://www.apache.org/licenses/LICENSE-2.0 12 | # 13 | # Unless required by applicable law or agreed to in writing, 14 | # software distributed under the License is distributed on an 15 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | # KIND, either express or implied. See the License for the 17 | # specific language governing permissions and limitations 18 | # under the License. 19 | # ---------------------------------------------------------------------------- 20 | 21 | # ---------------------------------------------------------------------------- 22 | # Maven Start Up Batch script 23 | # 24 | # Required ENV vars: 25 | # ------------------ 26 | # JAVA_HOME - location of a JDK home dir 27 | # 28 | # Optional ENV vars 29 | # ----------------- 30 | # M2_HOME - location of maven2's installed home dir 31 | # MAVEN_OPTS - parameters passed to the Java VM when running Maven 32 | # e.g. to debug Maven itself, use 33 | # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 34 | # MAVEN_SKIP_RC - flag to disable loading of mavenrc files 35 | # ---------------------------------------------------------------------------- 36 | 37 | if [ -z "$MAVEN_SKIP_RC" ] ; then 38 | 39 | if [ -f /etc/mavenrc ] ; then 40 | . /etc/mavenrc 41 | fi 42 | 43 | if [ -f "$HOME/.mavenrc" ] ; then 44 | . "$HOME/.mavenrc" 45 | fi 46 | 47 | fi 48 | 49 | # OS specific support. $var _must_ be set to either true or false. 50 | cygwin=false; 51 | darwin=false; 52 | mingw=false 53 | case "`uname`" in 54 | CYGWIN*) cygwin=true ;; 55 | MINGW*) mingw=true;; 56 | Darwin*) darwin=true 57 | # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home 58 | # See https://developer.apple.com/library/mac/qa/qa1170/_index.html 59 | if [ -z "$JAVA_HOME" ]; then 60 | if [ -x "/usr/libexec/java_home" ]; then 61 | export JAVA_HOME="`/usr/libexec/java_home`" 62 | else 63 | export JAVA_HOME="/Library/Java/Home" 64 | fi 65 | fi 66 | ;; 67 | esac 68 | 69 | if [ -z "$JAVA_HOME" ] ; then 70 | if [ -r /etc/gentoo-release ] ; then 71 | JAVA_HOME=`java-config --jre-home` 72 | fi 73 | fi 74 | 75 | if [ -z "$M2_HOME" ] ; then 76 | ## resolve links - $0 may be a link to maven's home 77 | PRG="$0" 78 | 79 | # need this for relative symlinks 80 | while [ -h "$PRG" ] ; do 81 | ls=`ls -ld "$PRG"` 82 | link=`expr "$ls" : '.*-> \(.*\)$'` 83 | if expr "$link" : '/.*' > /dev/null; then 84 | PRG="$link" 85 | else 86 | PRG="`dirname "$PRG"`/$link" 87 | fi 88 | done 89 | 90 | saveddir=`pwd` 91 | 92 | M2_HOME=`dirname "$PRG"`/.. 93 | 94 | # make it fully qualified 95 | M2_HOME=`cd "$M2_HOME" && pwd` 96 | 97 | cd "$saveddir" 98 | # echo Using m2 at $M2_HOME 99 | fi 100 | 101 | # For Cygwin, ensure paths are in UNIX format before anything is touched 102 | if $cygwin ; then 103 | [ -n "$M2_HOME" ] && 104 | M2_HOME=`cygpath --unix "$M2_HOME"` 105 | [ -n "$JAVA_HOME" ] && 106 | JAVA_HOME=`cygpath --unix "$JAVA_HOME"` 107 | [ -n "$CLASSPATH" ] && 108 | CLASSPATH=`cygpath --path --unix "$CLASSPATH"` 109 | fi 110 | 111 | # For Mingw, ensure paths are in UNIX format before anything is touched 112 | if $mingw ; then 113 | [ -n "$M2_HOME" ] && 114 | M2_HOME="`(cd "$M2_HOME"; pwd)`" 115 | [ -n "$JAVA_HOME" ] && 116 | JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" 117 | fi 118 | 119 | if [ -z "$JAVA_HOME" ]; then 120 | javaExecutable="`which javac`" 121 | if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then 122 | # readlink(1) is not available as standard on Solaris 10. 123 | readLink=`which readlink` 124 | if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then 125 | if $darwin ; then 126 | javaHome="`dirname \"$javaExecutable\"`" 127 | javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" 128 | else 129 | javaExecutable="`readlink -f \"$javaExecutable\"`" 130 | fi 131 | javaHome="`dirname \"$javaExecutable\"`" 132 | javaHome=`expr "$javaHome" : '\(.*\)/bin'` 133 | JAVA_HOME="$javaHome" 134 | export JAVA_HOME 135 | fi 136 | fi 137 | fi 138 | 139 | if [ -z "$JAVACMD" ] ; then 140 | if [ -n "$JAVA_HOME" ] ; then 141 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 142 | # IBM's JDK on AIX uses strange locations for the executables 143 | JAVACMD="$JAVA_HOME/jre/sh/java" 144 | else 145 | JAVACMD="$JAVA_HOME/bin/java" 146 | fi 147 | else 148 | JAVACMD="`which java`" 149 | fi 150 | fi 151 | 152 | if [ ! -x "$JAVACMD" ] ; then 153 | echo "Error: JAVA_HOME is not defined correctly." >&2 154 | echo " We cannot execute $JAVACMD" >&2 155 | exit 1 156 | fi 157 | 158 | if [ -z "$JAVA_HOME" ] ; then 159 | echo "Warning: JAVA_HOME environment variable is not set." 160 | fi 161 | 162 | CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher 163 | 164 | # traverses directory structure from process work directory to filesystem root 165 | # first directory with .mvn subdirectory is considered project base directory 166 | find_maven_basedir() { 167 | 168 | if [ -z "$1" ] 169 | then 170 | echo "Path not specified to find_maven_basedir" 171 | return 1 172 | fi 173 | 174 | basedir="$1" 175 | wdir="$1" 176 | while [ "$wdir" != '/' ] ; do 177 | if [ -d "$wdir"/.mvn ] ; then 178 | basedir=$wdir 179 | break 180 | fi 181 | # workaround for JBEAP-8937 (on Solaris 10/Sparc) 182 | if [ -d "${wdir}" ]; then 183 | wdir=`cd "$wdir/.."; pwd` 184 | fi 185 | # end of workaround 186 | done 187 | echo "${basedir}" 188 | } 189 | 190 | # concatenates all lines of a file 191 | concat_lines() { 192 | if [ -f "$1" ]; then 193 | echo "$(tr -s '\n' ' ' < "$1")" 194 | fi 195 | } 196 | 197 | BASE_DIR=`find_maven_basedir "$(pwd)"` 198 | if [ -z "$BASE_DIR" ]; then 199 | exit 1; 200 | fi 201 | 202 | ########################################################################################## 203 | # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 204 | # This allows using the maven wrapper in projects that prohibit checking in binary data. 205 | ########################################################################################## 206 | if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then 207 | if [ "$MVNW_VERBOSE" = true ]; then 208 | echo "Found .mvn/wrapper/maven-wrapper.jar" 209 | fi 210 | else 211 | if [ "$MVNW_VERBOSE" = true ]; then 212 | echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." 213 | fi 214 | if [ -n "$MVNW_REPOURL" ]; then 215 | jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 216 | else 217 | jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 218 | fi 219 | while IFS="=" read key value; do 220 | case "$key" in (wrapperUrl) jarUrl="$value"; break ;; 221 | esac 222 | done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" 223 | if [ "$MVNW_VERBOSE" = true ]; then 224 | echo "Downloading from: $jarUrl" 225 | fi 226 | wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" 227 | if $cygwin; then 228 | wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` 229 | fi 230 | 231 | if command -v wget > /dev/null; then 232 | if [ "$MVNW_VERBOSE" = true ]; then 233 | echo "Found wget ... using wget" 234 | fi 235 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 236 | wget "$jarUrl" -O "$wrapperJarPath" 237 | else 238 | wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" 239 | fi 240 | elif command -v curl > /dev/null; then 241 | if [ "$MVNW_VERBOSE" = true ]; then 242 | echo "Found curl ... using curl" 243 | fi 244 | if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then 245 | curl -o "$wrapperJarPath" "$jarUrl" -f 246 | else 247 | curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f 248 | fi 249 | 250 | else 251 | if [ "$MVNW_VERBOSE" = true ]; then 252 | echo "Falling back to using Java to download" 253 | fi 254 | javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" 255 | # For Cygwin, switch paths to Windows format before running javac 256 | if $cygwin; then 257 | javaClass=`cygpath --path --windows "$javaClass"` 258 | fi 259 | if [ -e "$javaClass" ]; then 260 | if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 261 | if [ "$MVNW_VERBOSE" = true ]; then 262 | echo " - Compiling MavenWrapperDownloader.java ..." 263 | fi 264 | # Compiling the Java class 265 | ("$JAVA_HOME/bin/javac" "$javaClass") 266 | fi 267 | if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then 268 | # Running the downloader 269 | if [ "$MVNW_VERBOSE" = true ]; then 270 | echo " - Running MavenWrapperDownloader.java ..." 271 | fi 272 | ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") 273 | fi 274 | fi 275 | fi 276 | fi 277 | ########################################################################################## 278 | # End of extension 279 | ########################################################################################## 280 | 281 | export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} 282 | if [ "$MVNW_VERBOSE" = true ]; then 283 | echo $MAVEN_PROJECTBASEDIR 284 | fi 285 | MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" 286 | 287 | # For Cygwin, switch paths to Windows format before running java 288 | if $cygwin; then 289 | [ -n "$M2_HOME" ] && 290 | M2_HOME=`cygpath --path --windows "$M2_HOME"` 291 | [ -n "$JAVA_HOME" ] && 292 | JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` 293 | [ -n "$CLASSPATH" ] && 294 | CLASSPATH=`cygpath --path --windows "$CLASSPATH"` 295 | [ -n "$MAVEN_PROJECTBASEDIR" ] && 296 | MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` 297 | fi 298 | 299 | # Provide a "standardized" way to retrieve the CLI args that will 300 | # work with both Windows and non-Windows executions. 301 | MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" 302 | export MAVEN_CMD_LINE_ARGS 303 | 304 | WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 305 | 306 | exec "$JAVACMD" \ 307 | $MAVEN_OPTS \ 308 | -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ 309 | "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ 310 | ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" 311 | -------------------------------------------------------------------------------- /northwind/mvnw.cmd: -------------------------------------------------------------------------------- 1 | @REM ---------------------------------------------------------------------------- 2 | @REM Licensed to the Apache Software Foundation (ASF) under one 3 | @REM or more contributor license agreements. See the NOTICE file 4 | @REM distributed with this work for additional information 5 | @REM regarding copyright ownership. The ASF licenses this file 6 | @REM to you under the Apache License, Version 2.0 (the 7 | @REM "License"); you may not use this file except in compliance 8 | @REM with the License. You may obtain a copy of the License at 9 | @REM 10 | @REM https://www.apache.org/licenses/LICENSE-2.0 11 | @REM 12 | @REM Unless required by applicable law or agreed to in writing, 13 | @REM software distributed under the License is distributed on an 14 | @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | @REM KIND, either express or implied. See the License for the 16 | @REM specific language governing permissions and limitations 17 | @REM under the License. 18 | @REM ---------------------------------------------------------------------------- 19 | 20 | @REM ---------------------------------------------------------------------------- 21 | @REM Maven Start Up Batch script 22 | @REM 23 | @REM Required ENV vars: 24 | @REM JAVA_HOME - location of a JDK home dir 25 | @REM 26 | @REM Optional ENV vars 27 | @REM M2_HOME - location of maven2's installed home dir 28 | @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands 29 | @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending 30 | @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven 31 | @REM e.g. to debug Maven itself, use 32 | @REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 33 | @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files 34 | @REM ---------------------------------------------------------------------------- 35 | 36 | @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' 37 | @echo off 38 | @REM set title of command window 39 | title %0 40 | @REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' 41 | @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% 42 | 43 | @REM set %HOME% to equivalent of $HOME 44 | if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") 45 | 46 | @REM Execute a user defined script before this one 47 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre 48 | @REM check for pre script, once with legacy .bat ending and once with .cmd ending 49 | if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" 50 | if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" 51 | :skipRcPre 52 | 53 | @setlocal 54 | 55 | set ERROR_CODE=0 56 | 57 | @REM To isolate internal variables from possible post scripts, we use another setlocal 58 | @setlocal 59 | 60 | @REM ==== START VALIDATION ==== 61 | if not "%JAVA_HOME%" == "" goto OkJHome 62 | 63 | echo. 64 | echo Error: JAVA_HOME not found in your environment. >&2 65 | echo Please set the JAVA_HOME variable in your environment to match the >&2 66 | echo location of your Java installation. >&2 67 | echo. 68 | goto error 69 | 70 | :OkJHome 71 | if exist "%JAVA_HOME%\bin\java.exe" goto init 72 | 73 | echo. 74 | echo Error: JAVA_HOME is set to an invalid directory. >&2 75 | echo JAVA_HOME = "%JAVA_HOME%" >&2 76 | echo Please set the JAVA_HOME variable in your environment to match the >&2 77 | echo location of your Java installation. >&2 78 | echo. 79 | goto error 80 | 81 | @REM ==== END VALIDATION ==== 82 | 83 | :init 84 | 85 | @REM Find the project base dir, i.e. the directory that contains the folder ".mvn". 86 | @REM Fallback to current working directory if not found. 87 | 88 | set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% 89 | IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir 90 | 91 | set EXEC_DIR=%CD% 92 | set WDIR=%EXEC_DIR% 93 | :findBaseDir 94 | IF EXIST "%WDIR%"\.mvn goto baseDirFound 95 | cd .. 96 | IF "%WDIR%"=="%CD%" goto baseDirNotFound 97 | set WDIR=%CD% 98 | goto findBaseDir 99 | 100 | :baseDirFound 101 | set MAVEN_PROJECTBASEDIR=%WDIR% 102 | cd "%EXEC_DIR%" 103 | goto endDetectBaseDir 104 | 105 | :baseDirNotFound 106 | set MAVEN_PROJECTBASEDIR=%EXEC_DIR% 107 | cd "%EXEC_DIR%" 108 | 109 | :endDetectBaseDir 110 | 111 | IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig 112 | 113 | @setlocal EnableExtensions EnableDelayedExpansion 114 | for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a 115 | @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% 116 | 117 | :endReadAdditionalConfig 118 | 119 | SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" 120 | set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" 121 | set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain 122 | 123 | set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 124 | 125 | FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( 126 | IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B 127 | ) 128 | 129 | @REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central 130 | @REM This allows using the maven wrapper in projects that prohibit checking in binary data. 131 | if exist %WRAPPER_JAR% ( 132 | if "%MVNW_VERBOSE%" == "true" ( 133 | echo Found %WRAPPER_JAR% 134 | ) 135 | ) else ( 136 | if not "%MVNW_REPOURL%" == "" ( 137 | SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" 138 | ) 139 | if "%MVNW_VERBOSE%" == "true" ( 140 | echo Couldn't find %WRAPPER_JAR%, downloading it ... 141 | echo Downloading from: %DOWNLOAD_URL% 142 | ) 143 | 144 | powershell -Command "&{"^ 145 | "$webclient = new-object System.Net.WebClient;"^ 146 | "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ 147 | "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ 148 | "}"^ 149 | "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ 150 | "}" 151 | if "%MVNW_VERBOSE%" == "true" ( 152 | echo Finished downloading %WRAPPER_JAR% 153 | ) 154 | ) 155 | @REM End of extension 156 | 157 | @REM Provide a "standardized" way to retrieve the CLI args that will 158 | @REM work with both Windows and non-Windows executions. 159 | set MAVEN_CMD_LINE_ARGS=%* 160 | 161 | %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* 162 | if ERRORLEVEL 1 goto error 163 | goto end 164 | 165 | :error 166 | set ERROR_CODE=1 167 | 168 | :end 169 | @endlocal & set ERROR_CODE=%ERROR_CODE% 170 | 171 | if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost 172 | @REM check for post script, once with legacy .bat ending and once with .cmd ending 173 | if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" 174 | if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" 175 | :skipRcPost 176 | 177 | @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' 178 | if "%MAVEN_BATCH_PAUSE%" == "on" pause 179 | 180 | if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% 181 | 182 | exit /B %ERROR_CODE% 183 | -------------------------------------------------------------------------------- /northwind/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.4.5 9 | 10 | 11 | kodlamaio 12 | northwind 13 | 0.0.1-SNAPSHOT 14 | northwind 15 | Demo project for Spring Boot 16 | 17 | 11 18 | 19 | 20 | 21 | org.springframework.boot 22 | spring-boot-starter-data-jpa 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | 30 | org.springframework.boot 31 | spring-boot-devtools 32 | runtime 33 | true 34 | 35 | 36 | org.postgresql 37 | postgresql 38 | runtime 39 | 40 | 41 | org.projectlombok 42 | lombok 43 | true 44 | 45 | 46 | org.springframework.boot 47 | spring-boot-starter-test 48 | test 49 | 50 | 51 | io.springfox 52 | springfox-swagger2 53 | 2.9.2 54 | 55 | 56 | io.springfox 57 | springfox-swagger-ui 58 | 2.9.2 59 | 60 | 61 | org.springframework.boot 62 | spring-boot-starter-validation 63 | 64 | 65 | 66 | 67 | 68 | 69 | org.springframework.boot 70 | spring-boot-maven-plugin 71 | 72 | 73 | 74 | org.projectlombok 75 | lombok 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/NorthwindApplication.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.context.annotation.Bean; 6 | 7 | import springfox.documentation.builders.RequestHandlerSelectors; 8 | import springfox.documentation.spi.DocumentationType; 9 | import springfox.documentation.spring.web.plugins.Docket; 10 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 11 | 12 | @SpringBootApplication 13 | @EnableSwagger2 14 | public class NorthwindApplication { 15 | 16 | public static void main(String[] args) { 17 | SpringApplication.run(NorthwindApplication.class, args); 18 | } 19 | 20 | @Bean 21 | public Docket api() { 22 | return new Docket(DocumentationType.SWAGGER_2) 23 | .select() 24 | .apis(RequestHandlerSelectors.basePackage("kodlamaio.northwind")) 25 | .build(); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/api/ProductsController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.api; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestBody; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestParam; 11 | import org.springframework.web.bind.annotation.RestController; 12 | 13 | import kodlamaio.northwind.business.abstracts.ProductService; 14 | import kodlamaio.northwind.core.utilities.results.DataResult; 15 | import kodlamaio.northwind.core.utilities.results.Result; 16 | import kodlamaio.northwind.entities.concretes.Product; 17 | import kodlamaio.northwind.entities.dtos.ProductWithCategoryDto; 18 | 19 | @RestController 20 | @RequestMapping("/api/products") 21 | public class ProductsController { 22 | 23 | private ProductService productService; 24 | 25 | @Autowired // newleme işlemi yapıyor kısaca 26 | public ProductsController(ProductService productService) { 27 | super(); 28 | this.productService = productService; 29 | } 30 | 31 | @GetMapping("/getall") 32 | public DataResult> getAll() { 33 | return this.productService.getAll(); 34 | } 35 | 36 | @PostMapping("/add") 37 | public Result add(@RequestBody Product product) { 38 | return this.productService.add(product); 39 | } 40 | 41 | @GetMapping("/getByProductName") 42 | public DataResult getByProductName(@RequestParam String productName) { 43 | return this.productService.getByProductName(productName); 44 | } 45 | 46 | @GetMapping("/getByProductNameAndCategoryId") 47 | public DataResult getByProductNameAndCategoryId(@RequestParam("productName") String productName, 48 | @RequestParam("categoryId") int categoryId) { 49 | return this.productService.getByProductNameAndCategoryId(productName, categoryId); 50 | } 51 | 52 | @GetMapping("/getByProductNameContains") 53 | public DataResult> getByProductNameContains(@RequestParam("productName") String productName) { 54 | return this.productService.getByProductNameContains(productName); 55 | } 56 | 57 | @GetMapping("/getAllByPage") 58 | public DataResult> getAll(int pageNo, int pageSize) { 59 | return this.productService.getAll(pageNo, pageSize); 60 | } 61 | 62 | @GetMapping("/getAllDesc") 63 | public DataResult> getAllSorted() { 64 | return this.productService.getAllSorted(); 65 | } 66 | 67 | @GetMapping("/getProductWithCategoryDetails") 68 | public DataResult> ProductWithCategoryDetails() { 69 | return this.productService.getProductWithCategoryDetails(); 70 | } 71 | 72 | 73 | } 74 | 75 | //kodlama.io/api/products -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/api/UsersController.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.api; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | import javax.validation.Valid; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.http.HttpStatus; 10 | import org.springframework.http.ResponseEntity; 11 | import org.springframework.validation.FieldError; 12 | import org.springframework.web.bind.MethodArgumentNotValidException; 13 | import org.springframework.web.bind.annotation.ExceptionHandler; 14 | import org.springframework.web.bind.annotation.PostMapping; 15 | import org.springframework.web.bind.annotation.RequestBody; 16 | import org.springframework.web.bind.annotation.RequestMapping; 17 | import org.springframework.web.bind.annotation.ResponseStatus; 18 | import org.springframework.web.bind.annotation.RestController; 19 | 20 | 21 | import kodlamaio.northwind.business.abstracts.UserService; 22 | import kodlamaio.northwind.core.entities.User; 23 | import kodlamaio.northwind.core.utilities.results.ErrorDataResult; 24 | 25 | @RestController 26 | @RequestMapping(value="/api/users") 27 | public class UsersController { 28 | 29 | private UserService userService; 30 | 31 | @Autowired 32 | public UsersController(UserService userService) { 33 | super(); 34 | this.userService = userService; 35 | } 36 | 37 | @PostMapping(value="/add") 38 | public ResponseEntity add(@Valid @RequestBody User user) { 39 | return ResponseEntity.ok(this.userService.add(user)); 40 | } 41 | 42 | @ExceptionHandler(MethodArgumentNotValidException.class) 43 | @ResponseStatus(HttpStatus.BAD_REQUEST) 44 | public ErrorDataResult handleValidationException(MethodArgumentNotValidException exceptions){ 45 | Map validationErrors = new HashMap(); 46 | 47 | for(FieldError fieldError: exceptions.getBindingResult().getFieldErrors()) { 48 | validationErrors.put(fieldError.getField(),fieldError.getDefaultMessage()); 49 | } 50 | 51 | ErrorDataResult errors=new ErrorDataResult(validationErrors,"Doğrulama hataları"); 52 | return errors; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/business/abstracts/ProductService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.business.abstracts; 2 | 3 | import java.util.List; 4 | 5 | 6 | import kodlamaio.northwind.core.utilities.results.DataResult; 7 | import kodlamaio.northwind.core.utilities.results.Result; 8 | import kodlamaio.northwind.entities.concretes.Product; 9 | import kodlamaio.northwind.entities.dtos.ProductWithCategoryDto; 10 | 11 | public interface ProductService { 12 | DataResult> getAll(); 13 | DataResult> getAll(int pageNo, int pageSize); 14 | DataResult> getAllSorted(); 15 | Result add(Product product); 16 | 17 | DataResult getByProductName(String productName); 18 | 19 | DataResult getByProductNameAndCategoryId(String productName, int categoryId); 20 | 21 | DataResult> getByProductNameOrCategoryId(String productName, int categoryId); 22 | 23 | DataResult> getByCategoryIdIn(List categories); 24 | 25 | DataResult> getByProductNameContains(String productName); 26 | 27 | DataResult> getByProductNameStartsWith(String productName); 28 | 29 | DataResult> getByNameAndCategory(String productName, int categoryId); 30 | 31 | DataResult> getProductWithCategoryDetails(); 32 | } 33 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/business/abstracts/UserService.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.business.abstracts; 2 | 3 | import kodlamaio.northwind.core.entities.User; 4 | import kodlamaio.northwind.core.utilities.results.DataResult; 5 | import kodlamaio.northwind.core.utilities.results.Result; 6 | 7 | public interface UserService { 8 | Result add(User user); 9 | DataResult findByEmail(String email); 10 | } 11 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/business/concretes/ProductManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.business.concretes; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.domain.PageRequest; 7 | import org.springframework.data.domain.Pageable; 8 | import org.springframework.data.domain.Sort; 9 | import org.springframework.stereotype.Service; 10 | 11 | import kodlamaio.northwind.business.abstracts.ProductService; 12 | import kodlamaio.northwind.core.utilities.results.DataResult; 13 | import kodlamaio.northwind.core.utilities.results.Result; 14 | import kodlamaio.northwind.core.utilities.results.SuccessDataResult; 15 | import kodlamaio.northwind.core.utilities.results.SuccessResult; 16 | import kodlamaio.northwind.dataAccess.abstracts.ProductDao; 17 | import kodlamaio.northwind.entities.concretes.Product; 18 | import kodlamaio.northwind.entities.dtos.ProductWithCategoryDto; 19 | 20 | @Service 21 | public class ProductManager implements ProductService { 22 | 23 | private ProductDao productDao; 24 | 25 | @Autowired 26 | public ProductManager(ProductDao productDao) { 27 | super(); 28 | this.productDao = productDao; 29 | } 30 | 31 | @Override 32 | public DataResult> getAll() { 33 | 34 | return new SuccessDataResult>(this.productDao.findAll(), "Data listelendi"); 35 | 36 | // return this.productDao.findAll(); 37 | } 38 | 39 | @Override 40 | public Result add(Product product) { 41 | this.productDao.save(product); 42 | return new SuccessResult("Ürün eklendi"); 43 | } 44 | 45 | @Override 46 | public DataResult getByProductName(String productName) { 47 | return new SuccessDataResult(this.productDao.getByProductName(productName), "Data listelendi"); 48 | } 49 | 50 | @Override 51 | public DataResult getByProductNameAndCategoryId(String productName, int categoryId) { 52 | return new SuccessDataResult( 53 | this.productDao.getByProductNameAndCategory_CategoryId(productName, categoryId), "Data listelendi"); 54 | } 55 | 56 | @Override 57 | public DataResult> getByProductNameOrCategoryId(String productName, int categoryId) { 58 | return new SuccessDataResult>( 59 | this.productDao.getByProductNameOrCategory_CategoryId(productName, categoryId), "Data listelendi"); 60 | } 61 | 62 | @Override 63 | public DataResult> getByCategoryIdIn(List categories) { 64 | return new SuccessDataResult>(this.productDao.getByCategoryIn(categories), "Data listelendi"); 65 | } 66 | 67 | @Override 68 | public DataResult> getByProductNameContains(String productName) { 69 | return new SuccessDataResult>(this.productDao.getByProductNameContains(productName), 70 | "Data listelendi"); 71 | } 72 | 73 | @Override 74 | public DataResult> getByProductNameStartsWith(String productName) { 75 | return new SuccessDataResult>(this.productDao.getByProductNameStartsWith(productName), 76 | "Data listelendi"); 77 | } 78 | 79 | @Override 80 | public DataResult> getByNameAndCategory(String productName, int categoryId) { 81 | return new SuccessDataResult>(this.productDao.getByNameAndCategory(productName, categoryId), 82 | "Data listelendi"); 83 | } 84 | 85 | @Override 86 | public DataResult> getAll(int pageNo, int pageSize) { 87 | 88 | Pageable pageable = PageRequest.of(pageNo - 1, pageSize); 89 | 90 | return new SuccessDataResult>(this.productDao.findAll(pageable).getContent()); 91 | } 92 | 93 | @Override 94 | public DataResult> getAllSorted() { 95 | Sort sort = Sort.by(Sort.Direction.DESC, "productName"); 96 | return new SuccessDataResult>(this.productDao.findAll(sort), "Başarılı"); 97 | } 98 | 99 | @Override 100 | public DataResult> getProductWithCategoryDetails() { 101 | return new SuccessDataResult>(this.productDao.getProductWithCategoryDetails(), 102 | "Data listelendi"); 103 | } 104 | 105 | } 106 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/business/concretes/UserManager.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.business.concretes; 2 | 3 | import org.springframework.stereotype.Service; 4 | 5 | import kodlamaio.northwind.business.abstracts.UserService; 6 | import kodlamaio.northwind.core.dataAccess.UserDao; 7 | import kodlamaio.northwind.core.entities.User; 8 | import kodlamaio.northwind.core.utilities.results.DataResult; 9 | import kodlamaio.northwind.core.utilities.results.Result; 10 | import kodlamaio.northwind.core.utilities.results.SuccessDataResult; 11 | import kodlamaio.northwind.core.utilities.results.SuccessResult; 12 | 13 | @Service 14 | public class UserManager implements UserService { 15 | 16 | private UserDao userDao; 17 | 18 | public UserManager(UserDao userDao) { 19 | super(); 20 | this.userDao = userDao; 21 | } 22 | 23 | @Override 24 | public Result add(User user) { 25 | this.userDao.save(user); 26 | return new SuccessResult("Kullanıcı eklendi"); 27 | } 28 | 29 | @Override 30 | public DataResult findByEmail(String email) { 31 | return new SuccessDataResult(this.userDao.findByEmail(email),"Kullanıcı bulundu"); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/core/dataAccess/UserDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.core.dataAccess; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | 5 | import kodlamaio.northwind.core.entities.User; 6 | 7 | public interface UserDao extends JpaRepository { 8 | User findByEmail(String email); 9 | } 10 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/core/entities/User.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.core.entities; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | import javax.validation.constraints.Email; 10 | import javax.validation.constraints.NotBlank; 11 | import javax.validation.constraints.NotNull; 12 | 13 | import lombok.AllArgsConstructor; 14 | import lombok.Data; 15 | import lombok.NoArgsConstructor; 16 | 17 | @Entity 18 | @Data 19 | @Table(name="users") 20 | @AllArgsConstructor 21 | @NoArgsConstructor 22 | public class User { 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | @Column(name="id") 26 | private int id; 27 | 28 | @Column(name="email") 29 | @Email 30 | @NotBlank 31 | @NotNull 32 | private String email; 33 | 34 | @Column(name="password") 35 | @NotBlank 36 | @NotNull 37 | private String password; 38 | } 39 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/core/utilities/results/DataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.core.utilities.results; 2 | 3 | public class DataResult extends Result { 4 | 5 | private T data; 6 | 7 | public DataResult(T data, boolean success, String message) { 8 | super(success, message); 9 | this.data = data; 10 | } 11 | 12 | public DataResult(T data, boolean success) { 13 | super(success); 14 | this.data = data; 15 | } 16 | 17 | public T getData() { 18 | return data; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/core/utilities/results/ErrorDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.core.utilities.results; 2 | 3 | public class ErrorDataResult extends DataResult { 4 | 5 | public ErrorDataResult(T data, String message) { 6 | super(data, false, message); 7 | } 8 | 9 | public ErrorDataResult(T data) { 10 | super(data, false); 11 | } 12 | 13 | public ErrorDataResult(String message) { 14 | super(null, false, message); 15 | } 16 | 17 | public ErrorDataResult() { 18 | super(null, false); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/core/utilities/results/ErrorResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.core.utilities.results; 2 | 3 | public class ErrorResult extends Result { 4 | 5 | public ErrorResult() { 6 | super(false); 7 | } 8 | 9 | public ErrorResult(String message) { 10 | super(false,message); 11 | } 12 | 13 | } -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/core/utilities/results/Result.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.core.utilities.results; 2 | 3 | public class Result { 4 | private boolean success; 5 | private String message; 6 | 7 | public Result(boolean success) { 8 | this.success = success; 9 | } 10 | 11 | public Result(boolean success, String message) { 12 | //this.success = success; bunun yerine 13 | this(success); 14 | this.message = message; 15 | } 16 | 17 | public boolean isSuccess() { 18 | return success; 19 | } 20 | 21 | public void setSuccess(boolean success) { 22 | this.success = success; 23 | } 24 | 25 | public String getMessage() { 26 | return message; 27 | } 28 | 29 | public void setMessage(String message) { 30 | this.message = message; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/core/utilities/results/SuccessDataResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.core.utilities.results; 2 | 3 | public class SuccessDataResult extends DataResult { 4 | 5 | public SuccessDataResult(T data, String message) { 6 | super(data, true, message); 7 | } 8 | 9 | public SuccessDataResult(T data) { 10 | super(data, true); 11 | } 12 | 13 | public SuccessDataResult(String message) { 14 | super(null, true, message); 15 | } 16 | 17 | public SuccessDataResult() { 18 | super(null, true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/core/utilities/results/SuccessResult.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.core.utilities.results; 2 | 3 | public class SuccessResult extends Result { 4 | 5 | public SuccessResult() { 6 | super(true); 7 | } 8 | 9 | public SuccessResult(String message) { 10 | super(true,message); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/dataAccess/abstracts/ProductDao.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.dataAccess.abstracts; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.Query; 7 | 8 | import kodlamaio.northwind.entities.concretes.Product; 9 | import kodlamaio.northwind.entities.dtos.ProductWithCategoryDto; 10 | 11 | public interface ProductDao extends JpaRepository { 12 | Product getByProductName(String productName); 13 | 14 | Product getByProductNameAndCategory_CategoryId(String productName, int categoryId); 15 | 16 | List getByProductNameOrCategory_CategoryId(String productName, int categoryId); 17 | 18 | List getByCategoryIn(List categories); 19 | 20 | List getByProductNameContains(String productName); 21 | 22 | List getByProductNameStartsWith(String productName); 23 | 24 | @Query("From Product where productName=:productName and category.categoryId=:categoryId") 25 | List getByNameAndCategory(String productName, int categoryId); 26 | 27 | @Query("Select new kodlamaio.northwind.entities.dtos.ProductWithCategoryDto(p.id, p.productName, c.categoryName) From Category c Inner Join c.products p") 28 | List getProductWithCategoryDetails(); 29 | 30 | //select p.productId,p.productName, c.categoryName from Category c inner join Product p 31 | //on c.categoryId=p.categoryId 32 | 33 | //​select p.product_id,p.product_name, c.category_name,p.unit_price from products p 34 | //inner join categories c on p.category_id =c.category_id 35 | } 36 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/entities/concretes/Category.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.entities.concretes; 2 | 3 | 4 | 5 | import java.util.List; 6 | //import javax.persistence.*; 7 | import javax.persistence.Column; 8 | import javax.persistence.Entity; 9 | import javax.persistence.Id; 10 | import javax.persistence.OneToMany; 11 | import javax.persistence.Table; 12 | 13 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 14 | 15 | import lombok.AllArgsConstructor; 16 | import lombok.Data; 17 | import lombok.NoArgsConstructor; 18 | 19 | @Data 20 | @AllArgsConstructor 21 | @NoArgsConstructor 22 | @Table(name="categories") 23 | @Entity 24 | @JsonIgnoreProperties({"hibernateLazyInitializer","handler","products"}) 25 | public class Category { 26 | @Id 27 | @Column(name="category_id") 28 | private int categoryId; 29 | 30 | @Column(name="category_name") 31 | private String categoryName; 32 | 33 | @OneToMany(mappedBy="category") 34 | private List products; 35 | } 36 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/entities/concretes/Product.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.entities.concretes; 2 | 3 | import javax.persistence.Column; 4 | import javax.persistence.Entity; 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.JoinColumn; 9 | import javax.persistence.ManyToOne; 10 | import javax.persistence.Table; 11 | 12 | import lombok.AllArgsConstructor; 13 | import lombok.Data; 14 | import lombok.NoArgsConstructor; 15 | 16 | @Data 17 | @Entity 18 | @Table(name="products") 19 | @AllArgsConstructor 20 | @NoArgsConstructor 21 | public class Product { 22 | 23 | @Id 24 | @GeneratedValue(strategy = GenerationType.IDENTITY) 25 | @Column(name="product_id") 26 | private int id; 27 | 28 | //@Column(name="category_id") 29 | //private int categoryId; 30 | 31 | @Column(name="product_name") 32 | private String productName; 33 | 34 | @Column(name="unit_price") 35 | private double unitPrice; 36 | 37 | @Column(name="units_in_stock") 38 | private short unitsInStock; 39 | 40 | @Column(name="quantity_per_unit") 41 | private String quantityPerUnit; 42 | 43 | @ManyToOne() 44 | @JoinColumn(name="category_id") 45 | private Category category; 46 | 47 | 48 | } 49 | -------------------------------------------------------------------------------- /northwind/src/main/java/kodlamaio/northwind/entities/dtos/ProductWithCategoryDto.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind.entities.dtos; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Data; 5 | import lombok.NoArgsConstructor; 6 | 7 | @Data 8 | @AllArgsConstructor 9 | @NoArgsConstructor 10 | public class ProductWithCategoryDto { 11 | private int id; 12 | private String productName; 13 | private String categoryName; 14 | } 15 | -------------------------------------------------------------------------------- /northwind/src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect 2 | spring.jpa.hibernate.ddl-auto=update 3 | spring.jpa.hibernate.show-sql=true 4 | spring.datasource.url=jdbc:postgresql://localhost:5432/Northwind 5 | spring.datasource.username=postgres 6 | spring.datasource.password=26122018 7 | spring.jpa.properties.javax.persistence.validation.mode = none 8 | -------------------------------------------------------------------------------- /northwind/src/test/java/kodlamaio/northwind/NorthwindApplicationTests.java: -------------------------------------------------------------------------------- 1 | package kodlamaio.northwind; 2 | 3 | import org.junit.jupiter.api.Test; 4 | import org.springframework.boot.test.context.SpringBootTest; 5 | 6 | @SpringBootTest 7 | class NorthwindApplicationTests { 8 | 9 | @Test 10 | void contextLoads() { 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /oopIntro/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /oopIntro/.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /oopIntro/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | oopIntro 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /oopIntro/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=15 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=15 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled 11 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 12 | org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning 13 | org.eclipse.jdt.core.compiler.release=enabled 14 | org.eclipse.jdt.core.compiler.source=15 15 | -------------------------------------------------------------------------------- /oopIntro/src/oopIntro/Category.java: -------------------------------------------------------------------------------- 1 | package oopIntro; 2 | 3 | public class Category { 4 | private int id; 5 | private String name; 6 | 7 | public Category() { 8 | 9 | } 10 | 11 | public Category(int id, String name) { 12 | this.id = id; 13 | this.name = name; 14 | } 15 | 16 | public int getId() { 17 | return id; 18 | } 19 | public void setId(int id) { 20 | this.id = id; 21 | } 22 | public String getName() { 23 | return name + "!"; 24 | } 25 | public void setName(String name) { 26 | this.name = name; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /oopIntro/src/oopIntro/Main.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/oopIntro/src/oopIntro/Main.java -------------------------------------------------------------------------------- /oopIntro/src/oopIntro/Product.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rzayevsahil/JavaCamp/35fabb95c9d8b04d690d0e8020bb4e03cf9c2088/oopIntro/src/oopIntro/Product.java -------------------------------------------------------------------------------- /oopIntro/src/oopIntro/ProductManager.java: -------------------------------------------------------------------------------- 1 | package oopIntro; 2 | 3 | public class ProductManager { 4 | public void addToCart(Product product) { 5 | System.out.println("Sepete eklendi : " + product.getName()); 6 | } 7 | } 8 | --------------------------------------------------------------------------------