ayupant123 / sapient-inters-jan-2022

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

  • MD - Mark Down

  • Adil - from MSRIT, blr - E&C - wathcing animies

  • Anurag - MSRIT - Computer science - Sketching

  • Ashish - MANIT Bhopal, MCA, - playing video games

  • Chetan - MCA - IP university, delhi - reading books and travelling

  • Gaurav - MCA - guru gobind singh delhi, playing cricket, and does web development

  • Gurpreet - MCA in thapar univerity patiyala, playing criket & volley ball

  • Kushal - MCA, Mulana Azad university, playing cricket and chess

  • Sumanth - MSRIT BLR, final year - playing criket, football

  • Manshu - MCA ip univerity delhi playing football

  • Mohit - Btech from srm univerity, playing cricket and watching TV's shows

  • Nischal - MCA, dheradhun univerity, playing piano, TT

  • ojasvi - MCA, NIT raipur, singing

  • Priya - Btech from manipal univerity, playing badminton & gardening

  • Pulkit - MCA from thaphar, patiala , plays foot ball and doodling

  • Rahul - BE in IT, from chadigargh university, watch disnep movies, play criket and kabaddi

  • Ritu - final sem of MCA, nit jameshdpur - keep herself healthy

  • Roshni - MCA, USICT, robotics, dancing and yoga

  • Sangita - MCA from nit raipur, developing web application, paiting and travelling

  • Satyaa - Btech srm university, computers, playing video games

  • Sneha - PES University, did inter on robotic project, dancing and swim

  • Sumedh - MCA nit kurukshektra, web development, reading and painting

  • Vibhanshu - jaipur, BIT college, ui ux development, playing piano

  • Yashika - MCA, USICT, reading and painting

  • Yuvraj - MCA, from kurukshektra, riding bike, travelling, webseries

Ojasvi and Vibhanshu are the batch POC.

BitBucket, Jira Access MS Teams (Good)

C - BCA Java -

Approach - Left to Right - You learn programming and then think to apply it - Right to Left - You know what are you trying to solve and learn the right programming language to solve

List Of Softwares

  1. Jdk 11 - https://www.oracle.com/in/java/technologies/javase/jdk11-archive-downloads.html
  2. Eclipse - https://www.eclipse.org/downloads/packages/
  3. GitBash - https://git-scm.com/downloads
  4. VS Code - https://code.visualstudio.com/download
  5. Jenkins - https://www.jenkins.io/download/
  6. Docker - https://www.docker.com/products/docker-desktop
  7. Maven - https://maven.apache.org/download.cgi

Day 1

  • DevOps
Git for SCM
Introduction and Key Concepts
Setup Overview
Installing Git on a Mac via the Command Line
Git Configuration
Configuration Commands
Setup and Configuration
First Commit Commands
Working Locally
Gitting Historical
Removing Files
Moving Files
Ignoring Files
History and File Management Commands
Collaborating with Others -- Git Remotes and GitHub
Git Remote Commands
Going Remote 

Programming paradim

  • Low Code
  • No Code

git repo styles

  • Mono Repo

  • Branching Stratergy

  • Git is a tool to checking and checkout the code

  • GitHub is a cloud storage mechanism

--

  • Git Commands

git config user.name "Harry" - this will be applicable only to the folder you are in

git config --global user.name "Harry" - this will be applicable to the user you have logged in

git config --system user.name "Harry" - this will be applicable to entire system

git config --global --edit

git log --oneline --decorate --graph

git clone https://github.com/adithnaveen/delete-gitworks-inters-2022.git

git branch naveen-works main

create a file and put some content -> save -> Esc :wq

git add .

git ci -m "created new file "

git push origin


Git command in class room


  • 1017 git status
  • 1018 git add Hello.html
  • 1019 git status
  • 1020 git commit -m "initial commit"
  • 1021 git status
  • 1022 clear
  • 1023 git st
  • 1024 git config --global alias.st status
  • 1025 git st
  • 1026 git config --global alias.ci commit
  • 1027 git config --edit
  • 1028 git config --global --edit
  • 1029 git config --global --edit
  • 1030 vi Hello.html
  • 1031 git add Hello.html
  • 1032 git ci -m "added head and body tags"
  • 1033 git st
  • 1034 vi Hello.html
  • 1035 git st
  • 1036 git add .
  • 1037 git st
  • 1038 git ci -m "added h2 tag"
  • 1039 git st
  • 1040 git logs
  • 1041 git log
  • 1042 git log --oneline
  • 1043 git st
  • 1044 clear
  • 1045 git status
  • 1046 git log --oneline
  • 1047 git status
  • 1048 git branch
  • 1049 git br
  • 1050 git br -a
  • 1051 git branch pulkit-footer-branch
  • 1052 git br -a
  • 1053 code .
  • 1054 clear
  • 1055 git br
  • 1056 git checkout pulkit-footer-branch
  • 1057 git st
  • 1058 git add .
  • 1059 git ci -m "added footer code"
  • 1060 git log --oneline
  • 1061 git co main
  • 1062 git add .
  • 1063 git ci -m "added script tag"
  • 1064 git co pulkit-footer-branch
  • 1065 git co main
  • 1066 clear
  • 1067 git br
  • 1068 man git checkout
  • 1069 git checkout --help
  • 1070 git co -b nischal-css-works main
  • 1071 git br
  • 1072 git add .
  • 1073 git ci -m "added style tag"
  • 1074 git co main
  • 1075 git add .
  • 1076 git ci -m "added h3 "
  • 1077 git st
  • 1078 git br
  • 1079 ls -la
  • 1080 clear
  • 1081 ls
  • 1082 pwd
  • 1083 mkdir styles
  • 1084 cd styles
  • 1085 touch sample.css
  • 1086 git br
  • 1087 pwd
  • 1088 cd ..
  • 1089 git add .
  • 1090 git ci -m "added styles folder"
  • 1091 git br
  • 1092 git merge pulkit-footer-branch
  • 1093 git st
  • 1094 git add .
  • 1095 git ci -m "merged footer works"
  • 1096 clear
  • 1097 git br
  • 1098 git co nischal-css-works
  • 1099 git co main
  • 1100 git merge nischal-css-works
  • 1101 git log --oneline --decorate --graph
  • 1102 cat .git/HEAD
  • 1103 clear
  • 1104 cat .git/HEAD
  • 1105 git br
  • 1106 git co nischal-css-works
  • 1107 git branch --merged
  • 1108 git branch --no-merged
  • 1109 clear
  • 1110 git br
  • 11- 11 git co main
  • 1112 clear
  • 1113 git br
  • 1114 git log --oneline
  • 1115 git co -b new-html-dev acdc52f
  • 1116 git br
  • 1117 git add .
  • 1118 git ci -m "added para"
  • 1119 clear
  • 1120 git br
  • 1121 git branch --merged
  • 1122 git co main
  • 1123 git branch --merged
  • 1124 git branch --no-merged
  • 1125 git branch -d nischal-css-works
  • 1126 git branch -d pulkit-footer-branch
  • 1127 git log --oneline -5
  • 1128 git log --oneline -6
  • 1129 git log --oneline -7
  • 1130 git log --oneline -3
  • 1131 clear
  • 1132 pwd
  • 1133 git remote -v
  • 1134 git remote add origin https://github.com/adithnaveen/delete-gitworks-inters-2022.git
  • 1135 git remote -v
  • 1136 git st
  • 1137 git push origin main
  • 1138 git branch -a
  • 1139 git push origin new-html-dev
  • 1140 clear
  • 1141 git br
  • 1142 git co -b naveen-works main
  • 1143 git br
  • 1144 ls
  • 1145 vi Header.html
  • 1146 git add .
  • 1147 git ci -m "added header.html\n"
  • 1148 git push origin naveen-works
  • 1149 git br -a
  • 1150 clear
  • 1151 git pull
  • 1152 git br -a
  • 1153 git co sumant-branch
  • 1154 git co sumanth-branch
  • 1155 clear
  • 1156 git br
  • 1157 ls
  • 1158 cat Hello.
  • 1159 cat Hello.txt
  • 1160 vi Hello.txt
  • 1161 git add .
  • 1162 git ci -m "updated sumanth file"
  • 1163 git push origin sumant-branch
  • 1164 git push origin sumanth-branch

in the class room

  1. Classroom Works - mono repo (dont create branches)

  2. Project

  3. Assessment

  4. TDD - Test Driven Development

  5. BDD - Behavioural Driven Development

  6. DDD - Domain Driven Development

  7. MDD - Model Driven Development

Day 1 Quick Assignement (30 Mins )

  1. Create 1 github repo
  2. Add Collaborators 2-3
  3. 1 person shall create the main branch
  4. from there all others will create a branch
  5. you will code in respective branch (small code is enough)
  6. Then merge your code to main branch
  7. You should show the git graph to the class room
  8. Have a .gitignore file

Question: Satyaa - when conflits occur ?


#Day 2

Tools and Packages

APPLICATION PACKAGING AND BUILD TOOLS (MAVEN/GRADLE)

Introduction Why Maven? Introduction to debugging Install Java(Latest) Install Eclipse(Latest) Configure Tomcat in eclipse Web projects and eclipse settings Maven Installation and Setup POM XML Building the project from commandline Plugins, Repositories, Maven lifecycle goals Create a Maven Project in Eclipse, Writing Unit Tests Building from the Command Line Skipping Tests Skipping tests in eclipse Dependency Management Build the project Create the Parent POM, Update the Child POMs, Build the multi module project, The Six Scopes

  • Project Management Tool
    • Maven
    • Gradle
    • ivy
    • sbt...
	class Hello {}

mvn validate

mvn install

mvn package

mvn clean package

  • Working on Maven
    • IDE (Eclipse)
    • Command line
      • mvn --version

mvn archetype:generate -DgroupId=com.naveen -DartifactId=java-works-testing1 -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=1.4 -DinteractiveMode=false

cd java-works-testing

mvn install

java -cp ./target/java-works-testing-1.0-SNAPSHOT.jar com.naveen.App

mvn install -> it will compile -> test -> then only only install will take place if there are any error / test case failure then install is not completed you can ignore tests by below command

mvn -DskipTests=true install

-- to set path 

/Volumes/Kanchan/Softwares/maven/maven-3.8/bin
d:\somefolder\somefolder\maven\maven-3.8\bin
setting the path 
1. hit start -> type env -> look for environment variable -> user variable -> look for path -> add the copied text 

  1. log4j

  2. slf4j

  3. lockback

  4. Create a maven project in bitbucket where the repository is create


Day 3


Tools and Packages - Jenkins

  • Introduction to Jenkins UI
  • Keep playing with your first Job
  • Redirect your first Job's output
  • Learn how to execute a bash script from Jenkins
  • Learn how to create a Jenkins list parameter with your script
  • Introduction to Pipeline
  • Introduction to Jenkinsfile
  • Install the Jenkins Pipeline Plugin Create your first Pipeline
  • Add multi-steps to your Pipeline
  • Retry
  • Timeouts Environment variables
  • Credentials
  • Post actions

Teams

  • Satyaa, Mohit, Anurag - Chethan - t1
  • Gaurav, Chethan - Adil - t2
  • Adil, Sumanth - Ayushi -t3
  • Ayushi, Yashika - Ritu - t4
  • Ritu, Ashish - Vibhanshu - t5
  • Vibhansu , Ojasvi - Sumedh - t6
  • Sumedh, Yuvraj - Gurpreet - t7
  • Gurpreet, Kushal - Nischal - t8
  • Nischal, Priya - Rahul - t9
  • Rahul, Sangita - Pulkit - t10
  • Sneha, Pulkit - Roshini - t11
  • Roshini, Manshu - Satyaa - t12

Scurm Master

  • Pull Request

  • Validate what is expected and delivery

  • Do a dry run for the team

  • zip

  • rar

  • jar

  • war

$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:

Check console output at $BUILD_URL to view the results.

pipeline {
    agent any

    stages {
        stage('build') {
            steps {
                echo 'i can do some building here '
            }
        }
        stage('test') {
            steps {
                echo 'test stage goes here '
            }
        }
        stage('deployment') {
            steps {
                echo 'deployment stage '
            }
        }

    }
}

  1. create maven project in the branch called "maven-jenkins-works"

  2. in the source main write a method

     	public class Hello {
     		public String hi() { return "Sapient";}
     	}
    
  3. Write a test case to assert "Sapient" with "Sapient"

  4. Create a Jenkinsfile in the server and build the application

  5. install blue ocean

Day 4

  1. working with junit
  2. junit with jenkins
  3. what is this all about assertxxxx
  4. why/ when are we using pipeline and parameters
  5. where are we using jenkins in realtime
  6. why there is versioning in jenkins file
  • create a runnable jar
	write a program to say hi to user 

// development will come later 
	public String sayHi(String name) {
		return "Hi " + name; 
	}

// first test 
	public void testSayHi() {
		String name ="Adil"; 
		String expectedReturn = "Hi " + name; 
		assertEqulas(expectedReturn , sayHi(name));
	}

SDET -> Software Developer Enginer & Tester

  • in our class we had used junit -> 4.12
  • in adil pom.xml ther jutni is 3.8.x
      class MyTestCase extends Testcase  {
    
      }
    

Core Java, Java Introduction

  • Java Basics
  • Classes
  • Abstract Classes
  • Mutable Immtable classess
  • Interfaces
  • Compilers - Javac
  • JRE/JDK
  • Constructors, default ,paremetric
  • Methods
  • Packaging
  • Encapsulation - with Access Specifiers
  • Abstraction
  • Inheritence
    • is-a - Car is a vehicle, human is a animal - verticle inheritance
    • has-a - car has a streeing, human has a eye - horizontal
	class Employee {
		private int empId;
		private Name name; 
		private double epmSal;
	}

	class Customer {
		private int custId; 
		private double custIncome; 
		private Name name;
	}
	class Student {
		private int sId; 
		private Name name; 
	}

	class Name {
		private String firstName; 
		private String lastName; 
		private String middleName; 

	}
  • Polymorphism

  • static (block, variable, method )

  • c program

  • native programming language

  • in Windows it works only in windows - .exe file

  • in mac it works only in mac - a.out

  • there are different set of libraries / implementation for diff operating system

  • 1972 - Dennis Ritches wrote C programming - Unix

  • C language is very fast

  • in 1992 - Games Gostling - OAK - Semiconductor devices (unfortunately failed)

  • 1993 - java C++ (bjarne Strustrap)

	#define main mymain
	int * function () {}
	
	void mymain(int *p, char * args) { -> the main function will always return to underlying OS 
		printf("Hi"); 
	}

Java

  • Platform Independent
  • Threads
  • Collections
  • Excpetion
  • OOPS
	public class Hello  {
		public static void main(String [] args) {
			System.out.println("Hello"); 
		}
	}
	scanf("%d", &n);   -> hi("hello", "peter"); 
	#include <iostream>
	cin >> n; 
  • destructor
	-  in C

	main() {
		int *ptr; 
		ptr = int * malloc(sizeof(int)* 44); 

		.. 
		free(ptr); 
	}

	- in C++ 
	class Employee {
		Employee() {}
		~Employee() {}
	};

  • in C we call it as function
    • will always return value
  • in Java we call it as method
    • methods are inside the class
    • may, may not return value when needed it can return more than 1 value

conventions

  1. All variables shall be camel case -> empId, empName, empSalary,storeDataBaseFlag
  2. all methods shall be in cambel case -> getEmployeeRecord(), setEmployeeRecord(), viewBalance()
  3. all package names shall be in lower case -> com.sapeint, com.yourcompany
  4. all constants in uppercase -> PI, COMPANY_NAME

Specifiers and modifiers

  1. Specifiers

    1. public
    2. private - varibles or mehtods are only visible inside the class
    3. protected
    4. default(package)
  2. Modifiers

    1. static
    2. abstract
    3. synchronized

class vs object

  1. class is a blue print
  2. Object is instance of blue print

OO Behaviour -Java

  • Every class in java has a implicit super class called Object

  • Types of memory

    • Heap Memory - expadable and shrinkable memory
    • Mehtod Section - this memory section is "singleton" and will be associated with the methods - stack
    • Static section - this is kept in static section and this is also singleton many times static variables are called as class level variables
    • Local variable section - this section only resides in the memory till the enclsing bracket and and there is no garbage collection concept here

Project Statement - CLI

  1. Trainer Module
    1. Shall have profile
      1. Trainer Name, Qualification, number of years of exp, [technologies known], [companies trained],

      2. Register

        • Given the application is laoded on the system
        • When the trainer enter firstname, email, password, confirm password
        • And pressess '0' to save
        • Then save the details to the database
      3. Login

      4. Dashboard

      5. Forgot password

      6. Trainer Calendar

      7. Update personal profile

      8. ....

  2. Toc Module
    1. Subject, Pre-requisites, Duration, course oucome, [line item [ sub-line-itme ]] - is done by trainer / SME
    2. Type of program (Technical, Domain , Softskills, Behavioural... )
  3. Employee Module - calendar,Trainers details, TOC, class room
    1. class room name
    2. class room trainer
    3. Trainer feedback
    4. Class Room
  • Functional Techno

  • NFR - Non Functional Requirement

    • The system should always exit gracefully
    • The system should respond in stipulated time
    • The system shall not have the failover min promise uptime 99.99
  • BDD - Given When Then And But

--

Day 5

  • Java Basics
  • Classes
  • Abstract Classes
  • Mutable Immtable classess
  • Interfaces
  • Compilers - Javac
  • JRE/JDK
  • Constructors, default ,paremetric
  • Methods
  • Packaging
  • Encapsulation - with Access Specifiers
  • Abstraction
  • Inheritence
    • is-a - Car is a vehicle, human is a animal - verticle inheritance
    • has-a - car has a streeing, human has a eye - horizontal
  • Polymorphism
    • Compile Time - Overloading - same method name diffrent signature in same class
    • Run Time - Overriding - same method name, same signatures, different classes
  • comparable interface
  • static (block, variable, method )

EXCEPTION HANDLING

  • Using Efficient Exception Handling
  • Resource Clean up Rules and Finally.
  • Custom Exception Hierarchy
  • Exception Wrapper
  • Exception Loggings
  • partial deligation

Mutable Immtable classess

	public class Device {
		private int dId; 
		private String dName; 

		Device() {}
		public void setDId(int dId) {
			this.dId = dId;
		}
		.. getter 
		public void setdName(String dName) {
			this.dName = dName;
		}
		.. getter 
	}

	Devide d = new Device();
	d.setDId(101); 
	d.setDName("Laptop"); 
	System.out.println(d); 
	
	d.setDId(102); 
	d.setDName("Key Board"); 
	System.out.println(d); 
	
	--

	public class Device {
		private int dId; 
		private String dName; 

		Device(int dId, String dName) {
			this.dId = dId; 
			this.dName = dName; 
		}
	 
		.. getter 
		.. getter 
	}

	Devide d = new Device(101, "Laptop");
	 
	System.out.println(d); 
	
 
	System.out.println(d); 
  • Abstract method

    • If you dont hav the implementation then mark the class with ;, and method shall have abstract as access modifier
    • if a class has atleast 1 abstract method then the class should be marked as abstract
    • if the class is marked as abstract then you cannot create an object of the abstract class but you can hold the reference
    • reference -> is a pointer to instance vs instance -> memory allocation is done
    • the abstract can have implementation if needed
    • In java Multiple inheritence is not allowed
  • Interfaces

    • Interfaces are 100% abstract
    • In interfaces you cannot have any concrete implementation
    • In interfaces you cannot have variables -> final
    • Minimum access specifier in interfaces is public
    • Interfaces has nothing to with classes so nothing to do with Object
    • A class can implement an interface/s
    • An interface can extends interface / s
    • An interface cannot extend or implement the class
  • comprable

	Emp
		empId (asc/desc)
		empName
		empSal

	- Sneha - Nischal  -> 1, 0, -1 

EXCEPTION HANDLING

  • try - catch

  • try - (try - (try - (try - (try - catch) catch) catch) catch) - catch

  • try (open the file / db connection ) - catch (handle the case ) - finally 100% (close)

  • try - finally

  • throw - is at statement level

  • throws - is at method level

  • NameTooShortException

    • Surround It With try-catch
    • throws
  1. Need to complete the user stories
  2. Create Bean classes for the project

--

Day 6

-- Core Java -> GENERICS

  • IO

    • Reader / Writer Classess - .txt
    • InputStream / OutputStream Classess - non text class (.mp4, .docx, .jpg...) -> .ser
    • Scanner
  • Generics basics and implementation

  • How to Submit in Assessment

    git clone https://tools.publicis.sapient.com/bitbucket/scm/batch/testing-assessment.git

    git checkout main

    git checkout -b navks-naveen main

    CODE

    git add .

    git commit -m "completed assessment"

    git push origin navks-naveen

  • How to write code for Project

	scanf("%d", &i); 

	cin >> i; 

List of Topics For Tech Connect:

  1. 5g Edge Computing
  2. TRIE Algorithm
  3. Memory Managment in C, C++, Java
  4. Need of Cloud Native Application in Today's world
  5. Data Structures and Best Practices
  6. Diff between SQL / NoSQL
  7. A AA AAA Compliance
  8. OSWAP
  9. Open API 3.0
  10. Library V/S Framework (React vs angular)
  11. AWS And its application
  12. Virtualization / Hypervisor
  13. Generation Of Network
  14. BlockChain
  15. Containarization and Orchestraction
  16. RPA
  17. NFT
  • Generics
  • 1.5 jdk
  • (Employee, TeamLeader, Project Manager, CEO, COO, LND, Director ) -> Person

class MyArray{ Object [] emp; }

Day 7

  • Generics basics and implementation

T [] - 1,2,3,4,5,6 - and find the average T [] - 1.4,2.6,3.3,4.1,5.8,65.5 - and find the average T [] - "Harish", "sumedh", "Vibhanshu".... T [] - new Emp("Harish"), new Emp("Sumedh"), new Emp("Vibhanshu"),

1,2 = 1.5 -> float or double

  • sorting min / max
  • 10,2,3,4,5,6

[0] = 2 [1] = 10 [2] = 3

  • to pass generic object
  • Gen<?> genObject;
  • Gen genObject
  • Gen genEmp;
  • Gen genInteger;
  • Gen<? extends Number> getNumberType;
  • COLLECTIONS

    • Collection Interface
    • Iterator Interface
    • Set Interface
    • List Interface
    • Map Interface
    • List Iterator Interface
    • Sorted Set Interface
    • Sorted Map Interface
    • Unmodifiable Collection
    • Synchronized Wrappers
    • Thread Safety
    • Collections Utility Classes add more topics to cover Collection framework in depth
    	int arr[]= new int[4]; 
    	arr[0] = 10; 
    	arr[1] = 20; 
    	arr[2] = 30; 
    	arr[3] = 40; 
    
    	int arr1[] = new int[10]; 
    	// copy all the elements of arr -> arr1
    	arr[4] = 50; 
    	// rename arr1 -> arr 
    
    • Queue
    • Set
      • HashSet - store first strategy
      • TreeSet - in sorted order - retrive first strategy

    -- before overriding hashcode / equals Laptop [laptopId=102, laptopName=Dell -Yoga, laptopPrice=2200.0], Stored @ 1705929636 Laptop [laptopId=102, laptopName=Dell -Yoga, laptopPrice=2200.0], Stored @ 1297685781 Laptop [laptopId=101, laptopName=Apple MacBookPro, laptopPrice=2000.0], Stored @ 511833308

    • after overriding hashcode Laptop [laptopId=101, laptopName=Apple MacBookPro, laptopPrice=2000.0], Stored @ 65 Laptop [laptopId=102, laptopName=Dell -Yoga, laptopPrice=2200.0], Stored @ 68 Laptop [laptopId=102, laptopName=Dell -Yoga, laptopPrice=2200.0], Stored @ 68

    • after overriding hashcode / equals Laptop [laptopId=101, laptopName=Apple MacBookPro, laptopPrice=2000.0], Stored @ 65 Laptop [laptopId=102, laptopName=Dell -Yoga, laptopPrice=2200.0], Stored @ 68

    • OLTP - Online Transaction Processing

    • OLAP - Online Analytical Processing - Informatica, Tableu, BI Report, PowerBI etc...

    • Map

    - <K, V> -> Map<String, Account>, Map<String, Integer>, Map<String, List<String>>
    
    

    Day 8 - 28-Jan-2022

    MULTI THREADING AND PARALLEL COMPUTE

    • Concurrency API For java
    • Executors Framework
    • Lambda and threads
    • Futures and Callable , Completable

    Intrim Demo - Deliverables

    1. create a CLI application which shall have the complete application (TMS) running with the DBMS
    2. Expose to have test driven development approach
    3. Write unit test cases for the code written coverage should be min 60% - SonarQube
    4. The application shall have error handling mechanism (should use explicit errors)
    5. Application should be deployed with CI/CD - Jenkins
    6. application building should be done using Maven
    7. Java doc to be generated
      1. // single line
      2. /* multi line */
      3. /** java doc */
      4. /Applications/Eclipse.app/Contents/Eclipse/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_15.0.2.v20210201-0955/jre/bin/javadoc
    8. Plant UML
    9. multithreading to be shown atleast 1 use case (with executor prefer) + syncronizers
    10. Create a jar file and import
    11. Use of loggers - slf4j (logback / log4j)
    • app
      • src/main
        • com.impl
          • shall have only main
        • com.beans
          • shall have all beans also called as re-usable component
        • com.service
          • all validation code shall go here
        • com.controller
          • will talk to file / db
        • com.exception
          • create all you custom exception's here
        • com.util
          • accept number
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); 
    	System.out.println("Enter Your Name" ); 
    	String name = br.readLine();
    	// start processing 
    
    
    	class ReadUserData{
    		static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); 
    	
    		public static String getStringValue(String title) {
    			System.out.println("Enter " + title); 
    			return br.readLine();
    		}
    
    		public static Integer getStringValue(String title) throws InvalidNumberException{
    			System.out.println("Enter " + title); 
    			return Integer.parseInt(br.readLine());
    		}
    	}
    
    	class Impl {
    		void hi() {
    			String userName = ReadUserData.getStringValue("Name");
    		}
    	}
    
    
    - Map<String, String>
    - Map<String , List<String>>
    - Map<String, Map<String, List<String>>>
    

    -- threads

    • 300000000000 person invoking it -> 2nd person have to wait for 24 ms, 3rd person have to wait for 48ms
    • Aging - piling up, each person in the queue starts looking for opportunity
    	main() {	- 5ms 
    		hi(); 
    	}
    	hi(){ - 7ms 
    		hello();
    	}
    
    	hello(){- 10 ms 
    	.. 
    		cya();
    		... 
    	}
    	cya(){ - 2 ms 
    		// some BL 
    	}
    
    • 2.4 ghz - 2400000000 * 4
    1. synchrounous
    2. Asynchronous
    3. Reactive

    Day 9

    Teams

    • Satyaa, Mohit, Anurag - Chethan - t1 - will show intrim demo today

    • Gaurav, Chethan - Adil - t2 - bean classes are created

    • Adil, Sumanth - Ayushi -t3 - need to work nothing much to show

    • Ayushi, Yashika - Ritu - t4 - sent pull req, menu driven part is done, bean classes are completed

    • Ritu, Ashish - Vibhanshu - t5 - bean classes are done, reg, login is done, there are some changed, PR Raised

    • Vibhansu , Ojasvi - Sumedh - t6 - maven project is created, basic navigation functionality, need to create bean classes

    • Sumedh, Yuvraj - Gurpreet - t7 - there

    • Gurpreet, Kushal - Nischal - t8 - bean classes are created, login part

    • Nischal, Priya - Rahul - t9 - could not show much

    • Rahul, Sangita - Pulkit - t10 - created maven project, employee module added, completed main file, wokring on login module

    • Sneha, Pulkit - Roshini - t11 - its is still at conceptual leve

    • Roshini, Manshu - Satyaa - t12 - working on bean classes, and has exam's

    • Lambda

    • x -> x * x -> y -> y * y

    • (int x, int y) -> {return x +y ;}

    • any interface which has exactly 1 instance method then that interface is called as funcational interface

    	interface Consumer <T> {
    		void accept(T t);
    	}
    
    	interface Predicate<T> {
    		boolean test(T t);
    	}
    
    
    	Consumer c = new Customer(){
    		void accept(T t){
    			// your implemenation goes here 
    		}
    	}
    
    
    	Consumer  c = (t) -> {}
    

    Day 10

    STREAMS AND CONCURRENCY

    • Introduction on Streams
    • Map, List, Set
    • Filter
    • Sorted
    • Collect
    • for Each
    • reduce
      • Parallel Computing using Streams.
      • New String methods
      • New File Methods
      • HTTP Client in Java 11

    -- with map trainer.ser target pom.xml .classpath project .settings .project trainer.txt src

    -- without map ./trainer.ser ./target ./pom.xml ./.classpath ./project ./.settings ./.project ./trainer.txt ./src

    -- Create a list of Trainers tId, tName, tSalary using stream display only tName in upper case

    --

    select * from emp;

    select empname, salary from emp;

    select empname, salary from emp where empsalary > 3000;

    select empname, salary from emp where empsalary > 3000 and city = 'blr';

    select city, count(*), sum(salary), min(salary), max(salary), avg(salary) from emp where empsalary > 3000 and city = 'blr' group by city;

    • TODO
    • Product
      • name, qty, price
    1. for the name get the sum of qty

    2. Group by qty / price { 3=[Product [name=keyboard, qty=3, price=78.0]], 23=[Product [name=laptop, qty=23, price=1200.0]], 56=[Product [name=mouse, qty=56, price=9.0]], 10=[ Product [name=laptop, qty=10, price=1500.0], Product [name=mouse, qty=10, price=45.0], Product [name=adapter, qty=10, price=65.0] ] }

    3. by any chance if there are repeated product then only unique to be stored

    {65.0=[adapter], 9.0=[mouse], 1200.0=[laptop], 78.0=[keyboard], 45.0=[mouse], 1500.0=[laptop]}

    1. by any chance if there are repeated product then only unique to be stored only qty

    Day 11

    --

    • Satyaa, Mohit, Anurag - Chethan - t1 - will show intrim demo today,
      • not much progrees need to work on IO
    • Gaurav, Chethan - Adil - t2 - bean classes are created
      • not much progress
    • Adil, Sumanth - Ayushi -t3 - need to work nothing much to show
      • No Progress
    • Ayushi, Yashika - Ritu - t4 - sent pull req, menu driven part is done, bean classes are completed
      • registration, employee registration is done
      • code is not push still
      • has raised the PR
    • Ritu, Ashish - Vibhanshu - t5 - bean classes are done, reg, login is done, there are some changed, PR Raised
      • View profile employee and trainer
      • registration is completed
      • validation is pending
    • Vibhansu , Ojasvi - Sumedh - t6
      • maven project is created, basic navigation functionality, need to create bean classes
      • not much progress from yesterday - vibhanshu was off
    • Sumedh, Yuvraj - Gurpreet - t7 -
      • new code PR is not raise still
    • Gurpreet, Kushal - Nischal - t8
      • bean classes are created, login part
      • working on login part
      • have got some code errors and working
    • Nischal, Priya - Rahul - t9
      • could not show much
      • reg part is done
      • working on login part
      • some code problem to validate the data from the file
    • Rahul, Sangita - Pulkit - t10
      • created maven project, employee module added, completed main file, wokring on login module
      • working on refractoring
      • working on employee login
      • need to raise the PR
    • Sneha, Pulkit - Roshini - t11 - its is still at conceptual leve
      • not present
    • Roshini, Manshu - Satyaa - t12
      • working on bean classes, and has exam's
      • not much progress due to exams
      • has exams till 5th feb

    topics

    • HTTP Client in Java 11

    • JDBC and ORM (Hibernate)

    • JDBC Architecture

    • Connection

    • Statement, PreparedStatement & CallableStatement

    • ResultSet

    • Difficulties in JDBC

    • Overview of ORM

    • Hibernate basics

    • Hibernate setup

    • CRUD operations

    jdbc working

    create database sapientdb;

    use sapientdb;

    create table employee( empid int primary key, empname varchar(30), empsal decimal(9,2), empemail varchar(50) );

    show tables;

    desc employee;

    Statement -> only for sql statement PreapredStatement -> statement + batch updates CallableStatement -> preparedstatement + invokes functions / procedures

    • arrays starts from 0
    • positional paramener starts from 1
    • result set starts from -1

    -- hibernate

    	@Entity 
    	class Employee{}
    	Employee emp = new Employee(); - life span is only with in java 
    
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
            "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
            "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    
    <hibernate-configuration>
    
        <session-factory>
    
            <!-- Database connection settings -->
            <property name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
            <property name="connection.url">jdbc:mysql://localhost/navdb</property>
            <property name="connection.username">root</property>
            <property name="connection.password">kanchan@1</property>
    
            <!-- JDBC connection pool (use the built-in) -->
            <property name="connection.pool_size">2</property>
    
            <!-- SQL dialect --> 
            <property name="hibernate.dialect">org.hibernate.dialect.MySQL8Dialect</property>
    
            <!-- Enable Hibernate's current session context -->
            <property name="current_session_context_class">thread</property>
    
            <!-- Disable the second-level cache  -->
            <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
    
            <!-- Echo all executed SQL to stdout -->
            <property name="show_sql">true</property>
    
            <!-- Drop and re-create the database schema on startup -->
            <property name="hbm2ddl.auto">create</property>
         
    
         
        </session-factory>
    
    </hibernate-configuration>
    

    Day 12

    • Hibernate basics

    • Hibernate setup

    • CRUD operations

    • Association mapping

    • 1:N, N:1, 1:1, N:M Querying

    • Inheritance

    • Criteria / HQL

    • confirugation

      • hibernate.cfg.xml
    • for selecting the record in hibernate

      • Criteria - POJO
      • hql
      • native (sql)

About


Languages

Language:Java 100.0%