You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. InputSelectionException is handle by try catch block in BrandSelection for user input
2. ModelNotFoundException is handle by throws keyword on Phone class
Using reflection extract information(modifiers, return types, parameters, etc) about fields, constructors, methods. Create object and call method using the only reflection
Created a reflection class PhoneReflection to extract information from constructors fields and methods from Samsung class
Log messages to the console, file
Used LOGGER.info.severe.warning to prompt multiple statements
Home Task #12
Requirements for Home task #12
Requirements
Implementation
Create 2 Threads using Runnable and Thread
Package thread 2 threads PhoneThread and PhoneRunnable to implement threads
Create Connection Pool. Use collection from java.util.concurrent package. Connection class may be mocked. The pool should be threadsafe and lazy initialized.
ConnectionPool has a size of 5 and uses singlenton thread
Initialize Connection Pool object of size 5. Load Connection Pool using single threads and Java Thread Pool (7 threads in total)
Connection class and also created the DemoConnectionPool class to demonstrate usage
5 threads should be able to get the connection. 2 Threads should wait for the next available connection. The program should wait as well
Connection class and also created the DemoConnectionPool class to demonstrate usage
Implement previous point but with interfaces Future and CompletableStage
ConnectionPool class as well as DemoConnectionPool class implement all three tasks on Connection pool, refer to comments in both classes
Home Task #13
Requirements for Home task #13
Requirements
Implementation
Build hierarchy for Schema from the below course
DAO and Model hierarchy classes have been created
Create DAO classes with necessary interfaces, abstract classes, and Generics. DAO should be scalable and flexible to support another framework and another database as well. All CRUD operations should be supported using JDBC. Use connection pool from the below block
dao, model, and services packages; dao contains jdbc package with DAO implementaion class with a generic DAO interface, model package contains all Model classes, and services contains implementations package has well has Generic Services
Implement Service layer with necessary abstraction to be able to switch between databases and frameworks
Service package -> Generic Services interface & implementation package with Services for classes.
Home Task #14
Requirements for Home task #14
Requirements
Implementation
Create one XML file and XSD schema for at least 5 classes from the below hierarchy
Added XML and XSD that contains 5 classes: Brands,Countries,OperatingSystem,Phones,and UserAccounts
Validate XML file using XSD schema and assigned parser
Used validateXMLAgainstXSD, SchemaFactory, and the validator classes to perform the validation process
Parse XML file using one of the parsers from the title
The com.solvd.laba.ParserRunner clas parsers the XML file using the DocumentBuilder class.
Home Task #15
Requirements for Home task #15
Requirements
Implementation
Add JAXB annotations to the hierarchy. Date, List, and complex objects should be covered
Added JAXB annotations to the model hierarchy date is being handle by Brand Model as Phone Brand Foundation Date and list is handle by Phone Model for Phone Features every other complex objects is from other classes
Parse XML using JAXB
The JAXBParserRunner class uses the JAXBContext class to create a JAXB context for the PhoneData class: JAXBContext and other methods such as unmarshall; Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
Home Task #16
Requirements for Home task #16
Requirements
Implementation
Create one Json file for at least 5 classes from the hierarchy.
phone.json file is under resources with 5 classes: Brand, Country, OperatingSystem, Phone, User Accounts
Add Jackson’s annotation to the hierarchy. Date, List, and complex objects should be covered.
Model classes have Jackson's annotation in the hierarchy. Brand covers dates, Phone covers list by phone features
Parse JSON using Jackson
JSONParserRunner parse the JSON file by using Jackson by using object mapper
Home Task #17
Requirements for Home task #17
Requirements
Implementation
Add MyBatis DAOs to the existing hierarchy with the same requirements. Choose any XML or interface mapping.
Implementation here
Switch service classes to MyBatis.
Implementation here
This is an attempt by Ella to make minor changes and perform a pull
request. Please make sure the changes are visible on your side, and merge
if no conflicts