0% found this document useful (1 vote)
122 views64 pages

Elective - Introduction To Java Programming - Learning Guide

Uploaded by

Raj Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
122 views64 pages

Elective - Introduction To Java Programming - Learning Guide

Uploaded by

Raj Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Introduction to Application

Development with Java


Learning Reference Guide
Version v1.0
Page 1

Contents
Program Overview........................................................................................................................ 3
Learning Objectives ..................................................................................................................... 3
Software and Hardware Requirements ........................................................................................ 3
Week-wise Learning Plan ............................................................................................................. 4
Week 1 - Introduction to Computer Basics & Software Engineering Fundamentals .................. 4
1.1 Topics and Duration ........................................................................................................ 4
1.2 Learning Reference ......................................................................................................... 6
1.3 Hands-On ......................................................................................................................... 7
Week 2 - Software Engineering Fundamentals & OOP................................................................ 8
2.1 Topics & Duration ............................................................................................................ 8
2.2 Learning Reference ......................................................................................................... 9
2.3 Hands-On ........................................................................................................................10
Week 3 - OOP & HTML, CSS and JavaScript ..............................................................................11
3.1 Topics and Duration .......................................................................................................11
3.2 Learning Reference ........................................................................................................11
3.3 Hands-On ........................................................................................................................12
Week 4 - HTML, CSS and JavaScript ..........................................................................................15
4.1 Topics and Duration .......................................................................................................15
4.2 Learning Reference ........................................................................................................15
4.3 Hands-On ........................................................................................................................16
Week 5 - HTML, CSS and JavaScript ..........................................................................................18
5.1 Topics and Duration .......................................................................................................18
5.2 Learning Reference ........................................................................................................19
5.3 Hands-On ........................................................................................................................21
Week 6 - HTML, CSS and JavaScript & RDBMS Concepts and SQL..........................................25
6.1 Topics and Duration .......................................................................................................25
6.2 Learning Reference ........................................................................................................26
6.3 Hands-On ........................................................................................................................27
Week 7 - RDBMS Concepts and SQL ..........................................................................................31
Page 2

7.1 Topics and Duration .......................................................................................................31


7.2 Learning Reference ........................................................................................................32
7.3 Hands-On ........................................................................................................................33
Week 8 - RDBMS Concepts and SQL ..........................................................................................36
8.1 Topics and Duration .......................................................................................................36
8.2 Learning Reference ........................................................................................................37
8.3 Hands-On ........................................................................................................................38
Week 9 - RDBMS Concepts and SQL & Introduction to Java.....................................................42
9.1 Topics and Duration .......................................................................................................42
9.2 Learning Reference ........................................................................................................42
9.3 Hands-On ........................................................................................................................43
Week 10 - Introduction to Java Programming ............................................................................45
10.1 Topics and Duration .....................................................................................................45
10.2 Learning Reference ......................................................................................................46
10.3 Hands-On ......................................................................................................................46
Week 11 - Introduction to Java Programming ............................................................................48
11.1 Topics and Duration .....................................................................................................48
11.2 Learning Reference ......................................................................................................48
11.3 Hands-On ......................................................................................................................49
Week 12 - Introduction to Java Programming ............................................................................52
12.1 Topics and Duration .....................................................................................................52
12.2 Learning Reference ......................................................................................................52
12.3 Hands-On ......................................................................................................................53
Week 13 - Introduction to Java Programming ............................................................................54
13.1 Topics and Duration .....................................................................................................54
13.2 Learning Reference ......................................................................................................54
13.3 Hands-On ......................................................................................................................55
Week 14 - Introduction to Java Programming ............................................................................57
14.1 Topics and Duration .....................................................................................................57
14.2 Learning Reference ......................................................................................................57
14.3 Hands-On ......................................................................................................................58
Week 15 - Introduction to Java Programming ............................................................................59
Page 3

15.1 Topics and Duration .....................................................................................................59


15.2 Learning Reference ......................................................................................................60
15.3 Hands-On ......................................................................................................................60

Program Overview
Introduction of the collaboratively designed elective will significantly help the CS-IT & Non-CS-IT
students to be industry aligned and leverage IT as a competitive edge in their career while working in
their own discipline or specialization

Learning Objectives

At the end of this elective, student shall be able to:

 Explain computer basics.


 Explain software engineering basics.
 Explain object-oriented programming basics.
 Develop/ Solve scripts using JavaScript in a web page.
 Build website menus with CSS and JavaScript.
 Build forms and check for data accuracy.
 Apply JavaScript system objects.
 Construct objects in a web page.
 Build web page elements using the Document Object Model (DOM).
 Compare and Contrast user input using functions and events.
 Create an integrated development environment to write, compile, run, and test simple object -oriented Java
programs.
 Analyze and Apply modifications to Java programs that solve real-world problems.
 Write SQL statements that edit existing data.
 Write SQL statements that create database objects.
 Develop a simple working website using HTML, CSS, and JavaScript.
 Develop a simple CUI [Character User Interface] based application using Java & SQL

Software and Hardware Requirements

CPU Dual core 1.8 Ghz


Hardware

RAM 8 GB 

Hard Disk Space 500 GB


Page 4

Course S/W on Students Machine Remarks


Java Eclipse Oxygen 3A Alternate:
Programming JDK 1.8 Visual Studio Code
Software

Fundamentals Tomcat 9 JDK 11


Notepad ++
Chrome
RDBMS Oracle Pl/SQL Alternate: My SQL
(Oracle Database - Latest
version)

Note: The software suggested above are free and can be downloaded from Internet.  

Week-wise Learning Plan

WEEK 10

WEEK 11

WEEK 12

WEEK 13

WEEK 14

WEEK 15
WEEK 1

WEEK 2

WEEK 3

WEEK 4

WEEK 5

WEEK 6

WEEK 7

WEEK 8

WEEK 9
RDBMS
Introduction to HTML, Concepts and
Softw are
Computer OOP & CSS, and SQL
Engineering HTML, CSS, RDBMS Introduction to Programming
Basics & HTML, JavaScript
Fundamentals and Concepts & Introduction
Softw are
&
CSS, and
JavaScript
& RDBMS
and SQL to Java
Engineering JavaScript Concepts Programming
OOP
Fundamentals and SQL
Java

Week 1 - Introduction to Computer Basics & Software


Engineering Fundamentals
1.1 Topics and Duration

Learning Practice
Topics Sub-Topics
Duration Duration
Introduction to Computer Basics
Computer, Hardware, CPU,
Introduction to Computer Monitor, Keyboard/mouse, Memory
30
Basics - RAM, Storage, Software, OS,
Application, Saving a file, Files and
Page 5

folders
Home and Office Networks,
Networking Types and Structures,
Wired vs Wireless Networks,
Basics of Network Networking Topologies, 30
Networking Topology- Physical vs
Logical, Peer to Peer, Client
Server, Network Size
Network Addressing, Classes of
Networking Levels and IPv4, Public and Private IP
30
Layers and Protocols Addresses, What is a Protocol?
What is a Protocol Suite?
IP protocol, DHCP (Dynamic Host
Protocol Stacks,
configuration Protocol), DNS
Networking and Internet 30
(domain Name Service), General
Service
Networking Physical Component
Software Engineering Fundamentals

Software Requirement,
Overview of Requirement Problem Recognition, Evaluation 120
Analysis and Synthesis, Modeling,
Specification, Review

Objectives of Software Design,


Overview of Software Software Design Concepts,
90
Design Different levels of Software Design,
Software Design Process,
Architectural Design

Structured Programming,
Overview of Software
Functional Programming, 90
Implementation
Programming style, Software
Documentation, Software
Implementation Challenges

Software Validation, Software


Verification, Manual Vs Automated
Overview of Testing Testing, Testing Approaches, 180
Testing Levels, Testing
Documentation, Testing vs. Quality
Control, Quality Assurance and
Audit
Page 6

1.2 Learning Reference


Explore the learning links given below in the table in order to learn the concepts thoroughly.

Sub-Topics Reference Link


Introduction to Computer Basics

Computer, Hardware, CPU, Monitor, Link# 1


Keyboard/mouse, Memory - RAM, https://www.tutorialspoint.com/basics_of_computers/bas
Storage, Software, OS, Application, ics_of_computers_introduction.htm
Saving a file, Files and folders
Link# 2
https://www.computerhope.com/jargon/f/folder.htm

Link# 3
https://www.pcmag.com/encyclopedia/term/storage-vs-
memory

Home and Office Networks, Link# 1


Networking Types and Structures, https://courses.lumenlearning.com/santaana-
Wired vs Wireless Networks, informationsystems/chapter/networking-introduction/
Networking Topologies, Networking
Topology- Physical vs Logical, Peer
to Peer, Client Server, Network Size

Network Addressing, Classes of Link# 1


IPv4, Public and Private IP https://www.javatpoint.com/network-addressing
Addresses, What is a Protocol?
What is a Protocol Suite?
Link# 2
https://whatis.techtarget.com/definition/Internet-Protocol-
suite-IP-suite

IP protocol, DHCP (Dynamic Host Link# 1


configuration Protocol), DNS https://docs.microsoft.com/en-us/windows-
(domain Name Service), General server/networking/technologies/dhcp/dhcp-top
Networking Physical Component
Link# 2
https://www.tutorialspoint.com/Computer-Network-
Components

Software Engineering Fundamentals


Page 7

Software Requirement, Link# 1


Problem Recognition, Evaluation and https://www.javatpoint.com/software-engineering-
Synthesis, Modeling, Specification, requirement-analysis
Review
Link# 2
https://www.geeksforgeeks.org/activities-involved-in-
software-requirement-analysis/

Link# 1
Objectives of Software Design, https://www.geeksforgeeks.org/introduction-of-software-
Software Design Concepts, Different design-process-set-2/
levels of Software Design, Software
Design Process, Architectural Link# 2
Design https://www.geeksforgeeks.org/software-engineering-
software-design-process/

Link# 3
https://www.geeksforgeeks.org/software-engineering-
architectural-design/

Structured Programming, Functional Link# 1


Programming, Programming style, https://www.tutorialspoint.com/software_engineering/soft
Software Documentation, ware_implementation.htm
Software Implementation Challenges

Software Validation, Software Link# 1


Verification, Manual Vs Automated https://www.tutorialspoint.com/software_engineering/soft
Testing, Testing Approaches, ware_testing_overview.htm
Testing Levels, Testing
Documentation, Testing vs. Quality
Control, Quality Assurance and Audit

1.3 Hands-On
N/A
Page 8

Week 2 - Software Engineering Fundamentals & OOP

2.1 Topics & Duration


Learning Practice
Topics Sub-Topics
Duration Duration
Software Engineering Fundamentals

Overview of Software Need for Maintenance, Categories


60
Maintenance of Software Maintenance

What is Software Configuration


Management?, Why do we need
Configuration management?,
Tasks in SCM process,
Configuration Identification,
Overview of Configuration
Baseline, Change Control,
management and version 60
Configuration Status Accounting,
control
Configuration Audits and Reviews,
Participant of SCM process,
Software Configuration
Management Plan, Software
Configuration Management Tools

What is Agile?, What are Agile


Methodologies?, What is the Agile
Agile Basics Manifesto?, What is Agile project 120
management?, Agile Scrum
methodology
OOP
Problems in Functional
Object Oriented Concepts Programming, What Is Object- 120
Oriented Programming?
Declaration of Class, Declaring
Objects and Classes Objects, State of an Object, 30 120
Behaviour of an Object
Principles in Object-
Abstraction, Encapsulation 30 60
Oriented technology

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.
Page 9

2.2 Learning Reference

Sub-Topics Reference Link


Software Engineering Fundamentals

Need for Maintenance, Link# 1


Categories of Software https://www.geeksforgeeks.org/software-engineering-software-
Maintenance maintenance/

What is Software Link# 1


Configuration Management?, https://www.guru99.com/software-configuration-management-
Why do we need tutorial.html
Configuration management?,
Tasks in SCM process,
Configuration Identification,
Baseline, Change Control,
Configuration Status
Accounting, Configuration
Audits and Reviews,
Participant of SCM process,
Software Configuration
Management Plan, Software
Configuration Management
Tools

What is Agile?, What are Link# 1


Agile Methodologies?, What is https://www.digite.com/agile/agile-methodology/
the Agile Manifesto?, What is
Agile project management?,
Agile Scrum methodology

Problems in Functional Link# 1


Programming, What Is Object- https://www.geeksforgeeks.org/difference-between-functional-
Oriented Programming? programming-and-object-oriented-programming/

Declaration of Class, Link# 1


Declaring Objects, State of an https://www.geeksforgeeks.org/c-sharp-class-and-object/
Object, Behaviour of an
Object

Abstraction, Encapsulation
Link# 1
Page 10

https://www.c-sharpcorner.com/blogs/encapsulation-vs-
abstraction

2.3 Hands-On
Objectives

After completing these exercises, you will be able to:


 Declare a class in Java program
 Declare an object for the Java class
 Define states of an object
 Define behaviors of an object
 Work with OOP principles such as Abstraction and Encapsulation

Estimated Time to Complete these Labs

180 Minutes

Problem Title: BankAccount Class

 Create a Java class called Ban kAcco u nt which represents a bank account,
having as attributes: acco untNumber (numeric type), n ame (name of the
account owner as string type), balance.
 Create a co n str uctor with parameters: acco un tNumber , n ame , b alance.
 Create a d e p o sit() method which manages the deposit actions.
 Create a with d r awal() me th od which manages withdrawals actions.
 Create a b an kF ees() method to apply the bank fees with a percentage of
5% of the balance account.
 Create a d isp lay() method to display account details.
 Give the complete code for the Ban kAcco u nt class.
Page 11

Week 3 - OOP & HTML, CSS and JavaScript

3.1 Topics and Duration


Learning Practice
Topics Sub-Topics
Duration Duration
OOP
Principles in Object-
Inheritance, Polymorphism 60 60
Oriented technology
HTML, CSS and JavaScript
World Wide Web, IoT, Web
Introduction to Web
Programming, Web Framework, 30
Technology
HTML, CSS and JavaScript
HTML Overview, HTML Versions,
Introduction to HTML5, Semantic Web, Semantic Elements
HTML5 Elements, in HTML5, <header>, <nav>, 120 30
Semantic Elements <section>, <article>, <aside>,
<footer>
Define an HTML Table, <table>,
<tr>, <td>, <th>, <caption>,
Unordered List, Ordered List,
Description List, <ul>, <ol>, <li>,
<dl>, <dt>, <dd>, Hyperlinks, The
Table, List, Working with target Attribute, Absolute URLs vs.
120 60
Links, Image Handling Relative URLs, Use an Image as a
Link, Link to an Email Address,
<a>, href Attribute, <img>, The src
Attribute, The alt Attribute, Image
Size - Width and Height, Image as
a Link
The <form> Element, The <input>
Form-Input Elements, Element, Text Fields, The <label> 90 30
HTML5 Form elements Element, Radio Buttons,
Checkboxes, The Submit Button

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

3.2 Learning Reference

Sub-Topics Reference Link


OOP
Page 12

Link# 1
Inheritance, Polymorphism
https://www.guru99.com/c-sharp-inheritance-polymorphism.html

HTML, CSS and JavaScript

Link# 1
World Wide Web, IoT, Web https://www.w3schools.com/whatis/
Programming, Web
Framework, HTML, CSS and Link# 2
JavaScript https://internetofthingsagenda.techtarget.com/definition/Internet-
of-Things-IoT

HTML Overview, HTML


Link# 1
Versions, Semantic Web,
https://www.w3schools.com/html/html_intro.asp
Semantic Elements in
HTML5, <header>, <nav>,
Link# 2
<section>, <article>, <aside>,
<footer> https://www.w3schools.com/html/html5_semantic_elements.asp

The <form> Element, The Link# 1


<input> Element, Text Fields, https://www.w3schools.com/html/html_forms.asp
The <label> Element, Radio
Buttons, Checkboxes, The Link# 2
Submit Button https://www.w3schools.com/html/html_form_elements.asp

3.3 Hands-On
Objectives
After completing these exercises, you will be able to:
 Work with class inheritance in Java program
 Implement the polymorphic characteristics of an object

Estimated Time to Complete these Labs

60 Minutes

Problem Title: Person Class

 Create a Java class Person with attributes: name and age of type string.
 Create a display() method that displays the name and age of an object created via the
Person class.
Page 13

 Create a child class Student which inherits from the Person class and which also has
a section attribute.
 Create a method displayStudent() that displays the name, age and section of an object
created via the Student class.
 Create a student object via an instantiation on the Student class and then test the
displayStudent method.

HTML, CSS and JavaScript

Objectives

After completing these exercises, you will be able to:


 Demonstrate HTML5 semantic elements
 Use image, hyperlink tags
 Create form
 Create input tags like textbox, textarea, radiobutton, checkbox, reset/submit button etc.

Estimated Time to Complete these Labs

 120 Minutes

Problem Description:

Create a website with the following information and structure using HTML5:

 The contents of the home page should be:

- Logo and title of the website


- Navigation bar: links to presentation, studies and staff
- News (aside/article/section)
- Announcements (aside/article/section)
Page 14

- Footer: contact information and copyright

 Use these tags: <header>, <nav>, <aside>, <article>, <section>, <time>, <footer>.

 Here logo image, news, announcements used can be any suitable data

Design below form using HTML5

Note:
-City is drop down list with multiple city names
-Name, mobile number, address are mandatory fields. If any of these field is empty, after clicking
submit button, it should show like this.
Page 15

Week 4 - HTML, CSS and JavaScript

4.1 Topics and Duration


Learning Practice
Topics Sub-Topics
Duration Duration
HTML, CSS and JavaScript
Standard Attributes, align,
background, bgcolor, class, height,
HTML5 Attributes, Video hidden, id, style, tabindex, valign,
60 30
& Audio, iframes width, Embedding Video,
Embedding Audio, Handling Media
Events, HTML <iframe> Tag
What is CSS, Why use CSS, Inline
Introduction to CSS3,
Style, CSS Style Tags, Linking to 60 30
CSS Syntax, CSS Styling
CSS, Style Override Precedence
Text Color and Background Color,
Text and Fonts CSS Text Alignment, Text
properties, CSS Direction, Vertical Alignment, 180 60
Selectors, Different color Generic Font Families, The CSS
schemes font-family Property, Font Style,
Font Size
CSS Border Style, The border-style
property, Border Width, Border
CSS Borders, CSS Color, Border Sides, CSS Rounded
Margins, CSS Borders, margin-top, margin-right, 120 60
margin-bottom, margin-left, CSS
Backgrounds
background-color, Opacity /
Transparency, CSS background-
image, CSS background-repeat

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

4.2 Learning Reference

Sub-Topics Reference Link


HTML, CSS and JavaScript

Standard Attributes, align, Link# 1


background, bgcolor, class, https://www.tutorialspoint.com/html5/html5_attributes.htm
height, hidden, id, style,
tabindex, valign, width, Link# 2
Page 16

Embedding Video, https://www.w3schools.com/tags/tag_video.asp


Embedding Audio, Handling
Media Events, HTML Link# 3
<iframe> Tag https://www.w3schools.com/tags/tag_audio.asp

Link# 4
https://www.tutorialrepublic.com/html-reference/html5-event-
attributes.php

Link# 5
https://www.w3schools.com/tags/tag_iframe.ASP

Link# 1
What is CSS, Why use CSS, https://www.w3schools.com/css/css_intro.asp
Inline Style, CSS Style Tags,
Linking to CSS, Style Link# 2
Override Precedence https://www.w3docs.com/snippets/css/how-to-override-css-
styles.html

Text Color and Background Link# 1


Color, CSS Text Alignment, https://www.w3schools.com/css/css_text.asp
Text Direction, Vertical
Alignment, Generic Font Link# 2
Families, The CSS font-family https://www.w3schools.com/css/css_font.asp
Property, Font Style, Font
Size

CSS Border Style, The Link# 1


border-style property, Border https://www.w3schools.com/css/css_border.asp
Width, Border Color, Border
Sides, CSS Rounded Link# 2
Borders, margin-top, margin- https://www.w3schools.com/css/css_margin.asp
right, margin-bottom, margin-
left, CSS background-color, Link# 3
Opacity / Transparency, CSS https://www.w3schools.com/css/css_background.asp
background-image, CSS
background-repeat

4.3 Hands-On

Objectives
Page 17

After completing these exercises, you will be able to:


 Create Table
 Apply CSS Text and Font properties
 Apply CSS Background, Borders
 Apply Color Schemes
 Use HTML Form elements
 Use input, Text Field, Radio Button, Text Area, Select, Date and Submit Butto n
 Apply CSS Background, CSS Selectors, CSS Borders, CSS Margins

Estimated Time to Complete these Labs

 180 Minutes

Prerequisites

The following is required to complete this hands-on lab


• Visual studio code with Live Server/Any Editor
• Browser

Problem Description:

1. To Create this a HTML Application create a folder called TestCSS.


2. create a file called TableWithCSS.html
3. In the body tag, create a table with header, table rows and table data.
4. Use Internal CSS and provide styles as in sample output
5. Use any png image as background to table header with border radius of 6px.Refer to
output for color, height, width and font-size.
6. For the table, provide collapse to border-collapse attribute
7. For table data provide border of 1 px dotted and padding of 15px, width 1 00px, refer to
other properties and background color as in output
8. Run the Application in Live Server as http://127.0.0.1:5500/TableWithCSS.html
9. Or open the Application in browser

Problem Description:

1. To Create this HTML Application, create a folder called Telephone.


2. create a file called TelephoneComplaint.html
3. In the body tag create a form and table as shown in sample output with the labels and
input types as shown.
4. Include the following options under Nature Of Complaint
5. 1.Disconnection Problem
2.Phone Dead
3.Other
6. Create a TelephoneComplaint.css file and define the CSS properties here as per sample
output
7. Link CSS file to HTML file.
Page 18

8. Run the Application in Live Server as http://127.0.0.1:5500/TelephoneComplaint.html


Or open the Application in browser

Sample Output:

Week 5 - HTML, CSS and JavaScript

5.1 Topics and Duration


Learning Practice
Topics Sub-Topics
Duration Duration
HTML, CSS and JavaScript
Introduction to Javascript,
Execution of Javascript, Scripts in
JavaScript basics
head and body of HTML, Internal 90
and External Javascript, Javascript
Variables, Comments
Page 19

JavaScript Function Syntax, Built in


methods in Javascript, Function
Invocation, Function Return, Why
Functions in Javascript Functions?, The () Operator 30 30
Invokes the Function, Functions
Used as Variable Values, Local
Variables
Client-side form validation,
Different types of client-side
validation, Using built-in form
Javascript validation 60 30
validation, Validating forms using
JavaScript, Validating forms
without a built-in API
Introduction to JavaScript events,
Event flow, Event bubbling, Event
Events, Javascript event
capturing, Event object, 60 30
handling
addEventListener(),
preventDefault(), stopPropagation()
String Methods and Properties,
String Length, Extracting String
Parts, The substring() Method,
JavaScript Strings 60 30
Replacing String Content,
Converting Upper and Lower Case,
The concat() Method
JavaScript Date Output, Creating
Date Objects, new Date(),new
JavaScript Dates Date(year, month, ...), new 60 30
Date(dateString), Date Methods,
Displaying Dates
What is an Array, Creating an
Array in Javascript Array, Accessing Array Elements, 60 30
Array Properties and Methods,
Looping Array Elements

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

5.2 Learning Reference

Sub-Topics Reference Link


HTML, CSS and JavaScript

Introduction to Javascript, Link# 1


Execution of Javascript, https://www.geeksforgeeks.org/introduction-to-javascript/
Scripts in head and body of
Page 20

HTML, Internal and External Link# 2


Javascript, Javascript https://www.guru99.com/all-about-internal-external-
Variables, Comments javascript.html

Link# 3
https://javascript.info/variables

Link# 4
https://javascript.info/comments

JavaScript Function Syntax, Link# 1


Built in methods in Javascript, https://www.w3schools.com/js/js_functions.asp
Function Invocation, Function
Return, Why Functions?, The
() Operator Invokes the
Function, Functions Used as
Variable Values, Local
Variables

Client-side form validation, Link# 1


Different types of client-side https://developer.mozilla.org/en-
validation, Using built-in form US/docs/Learn/Forms/Form_validation
validation, Validating forms
using JavaScript, Validating
forms without a built-in API

Introduction to JavaScript Link# 1


events, Event flow, Event https://www.javascripttutorial.net/javascript-dom/javascript-
bubbling, Event capturing, events/
Event object,
addEventListener(),
preventDefault(),
stopPropagation()

String Methods and Link# 1


Properties, String Length, https://www.w3schools.com/js/js_string_methods.asp
Extracting String Parts, The
substring() Method, Replacing
String Content, Converting
Upper and Lower Case, The
concat() Method, Extracting
String Characters
Page 21

JavaScript Date Output, Link# 1


Creating Date Objects, new https://www.w3schools.com/js/js_dates.asp
Date(),new Date(year, month,
...), new Date(dateString),
Date Methods, Displaying
Dates

What is an Array, Creating an Link# 1


Array, Accessing Array https://www.w3schools.com/js/js_arrays.asp
Elements, Array Properties
and Methods, Looping Array
Elements

5.3 Hands-On
Objectives

After completing these exercises, you will be able to:


 Demonstrate embedding script in HTML
 Demonstrate JavaScript function, use of Variables, Operators
 Work with Strings and Arrays

Estimated Time to Complete these Labs

 180 Minutes

Prerequisites

The following is required to complete this hands-on lab


 Visual studio code with Live Server/Any Editor
 Browser

Problem Description:

1. To Create this HTML Application, create a folder called pyramid.


2. Create a file called pyramid.html
3. Use internal JS and define a function called buildPyramid with the number of rows as
parameter
4. Write the logic to construct a pyramid in the function.
5. Invoke the function with any value as row argument.
6. Open the application in browser or run in Live Server with URL as
http://127.0.0.1:5500/pyramid.html
Page 22

Sample Input 1: for 5 rows


Sample output 1:

Sample Input 2: for 6 rows


Sample Output 2:

Problem Description:

For this Application, use the existing application TelephoneComplaint.html created in folder
Telephone under section 4.3
Modify the HTML page to include the below validations in JavaScript
1. Subscriber Name is required and should have max length of 10.
2. validate Email to have @ and. symbol.
3. Registered Mobile number should be 10 digits

Detailed Complaint Description box should be disabled initially, and when user chooses Other
option in Nature of Complaint, Description box should get enabled and get disabl ed when a
subscriber changes the Nature Of Complaint to something else. (Disconnection Problem/Phone
Dead).
Hint: Use onchange event and write JS Code in function enableDisableTextBox(this) to
enable/disable description box. This refers to the option currently selected
Complaint raised date should be current date and shouldn’t be changed, it should be readyonly
and the date should be populated as soon as the form loads in browser.
Hint: write code in JS function getDate() to load current date.
Invoke this function using window.onload.
Open the application in browser or in LiveServer with URL as
http://127.0.0.1:5500/TelephoneComplaint.html
Page 23

Sample Output when form loads on browser (Assume sysdate/currentDate is 20-07-2021)


Page 24

Sample Output when NatureOf Complaint is chosen as Other

Problem Description:

Zip codes consist of 5 consecutive digits. Given a string, write a JavaScript function
isValid(zipCode) to determine whether the input is a valid zip code.
A valid zip code is as follows:
 Must only contain numbers (no non-digits allowed).
 Must not contain any spaces.
Must not be greater than 5 digits in length

Examples:

isValid("59001") ➞ true

isValid("853a7") ➞ false

isValid("732 32") ➞ false

isValid("393939") ➞ false
Page 25

A group of friends have decided to create a secret code which will be used to login their
application. This code will be the first letter of their names, sorted in alphabetical order and count
of group members.

Create a function that takes in an array of names and returns the secret code.

Examples:
findCode(["Adam", "Sarah", "Malcolm"]) ➞ "AMS3"

findCode(["Harry", "Newt", "Luna", "Cho"]) ➞ "CHLN4"

findCode(["Phoebe", "Chandler", "Rachel", "Ross", "Monica", "Joey"]) ➞ "CJMPRR6"

Note

The secret code name should entirely uppercased

Week 6 - HTML, CSS and JavaScript & RDBMS Concepts and


SQL

6.1 Topics and Duration


Learning Practice
Topics Sub-Topics
Duration Duration
HTML, CSS and JavaScript

What is Document Object Model


Document Object Model (DOM), Node Types, The
(Window, Frame, nodeName and nodeValue 60 30
Navigator Objects) properties, Node and Element,
Node Relationships

Working with Document


Object (Its Properties and Selecting Elements, Traversing
30 60
methods, Cookie Elements, Manipulating Elements
handling)
RDBMS Concepts and SQL Using Oracle
What is a Relational Database,
Introduction to RDBMS
The relational model, Benefits of 240
Concepts
relational database management
Page 26

system, ACID properties and


RDBMS
History of SQL, SQL Standards,
Introduction to SQL 30
How SQL Works
Guidelines for Managing Tables,
Creating and Managing
Creating Tables, Altering Tables, 30 30
Tables
Dropping Tables
Data Manipulation INSERT, UPDATE, DELETE 30 60

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

6.2 Learning Reference

Sub-Topics Reference Link


HTML, CSS and JavaScript

What is Document Link# 1


Object Model (DOM), https://www.javascripttutorial.net/javascript-dom/
Node Types, The
nodeName and
nodeValue properties,
Node and Element,
Node Relationships

Selecting Elements, Link# 1


Traversing Elements, https://www.javascripttutorial.net/javascript-dom/javascript-
Manipulating Elements getelementbyid/

RDBMS Concepts and SQL Using Oracle

What is a Relational Link# 1


Database, The relational https://www.oracle.com/in/database/what-is-a-relational-database/
model, Benefits of
relational database
management system,
ACID properties and
RDBMS

History of SQL, SQL Link# 1


Standards, How SQL https://docs.oracle.com/cd/B19306_01/server.102/b14200/intro.htm
Works
Link# 2
Page 27

https://www.geeksforgeeks.org/plsql-introduction/

Guidelines for Managing Link# 1


Tables, Creating Tables, https://docs.oracle.com/cd/B19306_01/server.102/b14231/tables.htm
Altering Tables,
Dropping Tables

Link# 1
INSERT, UPDATE, https://docs.oracle.com/en/database/oracle/oracle-
DELETE database/12.2/tdddg/dml-and-transactions.html#GUID-40EE6F61-
F008-4F37-8256-D31A2DE49DC9

6.3 Hands-On
Objectives

After completing these exercises, you will learn how to:


 Implement Event handling and functions
 Access DOM
 Manipulate DOM

Estimated Time to Complete these Labs

90 Minutes
Prerequisites

The following is required to complete this hands-on lab


 Visual studio code with Live Server/Any Editor
 Browser

Problem Description:

1. To Create this application, create a folder called DomManipulation.


2. Create a HTML file called dom.html with hyperlink for the paragraph text
3. “[On mouse hover here bold words of the following paragraph will be highlighted]”
4. Include 2 events onMouseOver and onMouseOut for the above hyperlink. For
onMouseOver define a function highlight() and for onMouseOu t define a function
return_normal.
5. Include the other paragraph having bold(strong) and non bold text as in output.
6. Create an external JS called dom.js and link to html file.

7. Define following functions in dom.js such that when window loads, it invokes func tion
getBold_items().
8. getBold_items() gets all the bold tags with tagname strong and stores it.
Page 28

9. highlight() iterates all stored bold tags and changes color to red.
10. return_normal() makes all highlighted words dark once the mouse is moved out from
hyperlink
11. Open the html application in browser or run in LiveServer with URL
http://127.0.0.1:5500/dom.html

Sample Output:

On loading the page in browser

Sample output-1 when mouse is moved over hyperlink

Sample Output-2 when mouse is moved away from hyperlink

Problem Description:

Given a list of items

<ul id="menu">
<li>Homepage</li>
<li>Services</li>
<li>About</li>
<li>Contact</li>
</ul>

Manipulate DOM using JS such that the DOM is changed to


Page 29

Problem Description:

Using DOM Manipulation create a dynamic shopping List as below

As items are entered, it gets added as below with the option to delete

When Chocolates is deleted, the List should be

RDBMS Concepts and SQL Using Oracle


Objectives

After completing this exercise, you will be able to:


 Create new tables in an Oracle database
 Modify an existing table structure in an Oracle database
 Removing an existing table permanently from an Oracle database
 Write DML statements in order to modify the records stored in tables

Estimated Time to Complete this Lab

90 Minutes
Page 30

Problem Title: Create Student table

Refer the below schema and create the student table.

Problem Title: Insert Records – Tickets

Insert the below records into tickets table.

Ticket_id Schedule_id User_id No_seats


T1 S5 1 2
T2 S2 5 1
Page 31

Week 7 - RDBMS Concepts and SQL


7.1 Topics and Duration

Topics Sub-Topics Learning Practice


Duration Duration
RDBMS Concepts and SQL Using Oracle
SELECT, FROM Clause,
Comparison Operators, WHERE
Basic SQL SELECT Clause, ORDER BY, AND, OR,
240 90
Statements DISTINCT, IN, IS NULL, IS NOT
NULL, LIKE, REGEXP_LIKE, NOT,
ALIASES
String Functions, Numeric
Functions, Date Functions,
Scalar & Aggregate
Conversion Functions, NULL- 180 90
Functions
related Functions, AVG, COUNT,
MAX, MIN, LISTAGG, SUM
Page 32

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

7.2 Learning Reference

Sub-Topics Reference Link


RDBMS Concepts and SQL Using Oracle

Link# 1
https://www.techonthenet.com/oracle/select.php

Link# 2
https://www.techonthenet.com/oracle/from.php

Link# 3
https://www.techonthenet.com/oracle/comparison_operators.php

Link# 4
https://www.techonthenet.com/oracle/where.php

Link# 5
https://www.techonthenet.com/oracle/order_by.php

SELECT, FROM Clause, Link# 6


Comparison Operators, https://www.techonthenet.com/oracle/and.php
WHERE Clause, ORDER
BY, AND, OR, DISTINCT, Link# 7
IN, IS NULL, IS NOT NULL, https://www.techonthenet.com/oracle/or.php
LIKE, REGEXP_LIKE, NOT,
ALIASES Link# 8
https://www.techonthenet.com/oracle/distinct.php

Link# 9
https://www.techonthenet.com/oracle/in.php

Link# 10
https://www.techonthenet.com/oracle/isnull.php

Link# 11
https://www.techonthenet.com/oracle/isnotnull.php

Link# 12
https://www.techonthenet.com/oracle/like.php

Link# 13
https://www.techonthenet.com/oracle/regexp_like.php
Page 33

Link# 14
https://www.techonthenet.com/oracle/not.php

Link# 15
https://www.techonthenet.com/oracle/alias.php

String Functions, Numeric Link# 1


Functions, Date Functions, https://docs.oracle.com/cd/E57185_01/IRWUG/ch12s04s01.html
Conversion Functions,
NULL-related Functions, Link# 2
AVG, COUNT, MAX, MIN, https://www.oracletutorial.com/oracle-aggregate-functions/
LISTAGG, SUM

7.3 Hands-On
Objectives

After completing these exercises, you will be able to:


 Retrieve records from an Oracle database using SELECT query
 Apply conditions based on which results can be generated
 Use various operators and clauses in order to limit the result set
 Deal with missing records using NULL-related functions
 Work with string functions to deal with character data
 Work with numeric functions to deal with numeric data
 Work with date functions to deal with date values
 Work with aggregate functions to return scalar value from the database tables

Estimated Time to Complete this Lab

180 Minutes
Page 34

Problem Title: Department name based on block number

Write a query to display the names of the departments in block number 3 in ascending order.
Page 35

Problem Title: Students Name based on Start and Ending Character


Write a query to display the names of the students that start with letter 'A' and end with the letter
'a', ordered in ascending order.
Page 36

Problem Title: Number of departments

Write a query to display the block number and number of departments in each block and give an
alias as NO_OF_DEPT. Sort the result based on NO_OF_DEPT in descending.

Week 8 - RDBMS Concepts and SQL

8.1 Topics and Duration


Learning Practice
Topics Sub-Topics
Duration Duration
RDBMS Concepts and SQL Using Oracle

Joins & Subqueries Oracle INNER JOIN, Oracle LEFT 240 120
JOIN, Oracle RIGHT JOIN,
Page 37

Introduction to the Oracle


Subquery, Advantages of Oracle
Subqueries, Oracle Subquery in
the SELECT clause, Oracle
Subquery in the FROM clause,
Oracle Subquery with comparison
operators, Oracle Subquery with IN
and NOT IN operators, Oracle
correlated Subquery, Oracle
correlated Subquery in the
WHERE clause, Oracle correlated
Subquery in the SELECT clause,
Oracle correlated Subquery with
the EXISTS operator
What is a VIEW in Oracle, Create
VIEW, Update VIEW, DROP
VIEW, What is an Index in Oracle,
Views & Index 180 60
Create an Index, Create a
Function-Based Index, Rename an
Index, Drop an Index

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

8.2 Learning Reference

Sub-Topics Reference Link


RDBMS Concepts and SQL Using Oracle

Oracle INNER JOIN, Oracle Link# 1


LEFT JOIN, Oracle RIGHT https://www.oracletutorial.com/oracle-basics/oracle-joins/
JOIN, Introduction to the
Oracle Subquery, Advantages Link# 2
of Oracle Subqueries, Oracle https://www.oracletutorial.com/oracle-basics/oracle-subquery/
Subquery in the SELECT
clause, Oracle Subquery in
the FROM clause, Oracle
Subquery with comparison
operators, Oracle Subquery
with IN and NOT IN operators,
Oracle correlated Subquery,
Oracle correlated Subquery in
the WHERE clause, Oracle
correlated Subquery in the
Page 38

SELECT clause,
Oracle correlated Subquery
with the EXISTS operator

Link# 1
https://www.techonthenet.com/oracle/views.php
Views & Index
Link# 2
https://www.techonthenet.com/oracle/indexes.php

8.3 Hands-On

Objectives

 After completing these exercises, you will be able to:


 Work with Oracle Join and its types
 Write Subquery that deals with multiple relations
 Work with Correlated Subquery
 Create and Manage Views in Oracle
 Create and Manage Index in Oracle

Estimated Time to Complete these Labs


180 Minutes
Page 39

Problem Title: Subject with Staff Details

Write a query to display the subjectname, code and staff name who handles that subject, ordered
by code in ascending order.
Page 40

Problem Title: Maximum mark in Subject with Staff name

Write a query to display list of staff name, subject name handled and maximum mark scored in
that subject. Give an alias to the maximum mark as max_mark. Sort the result based on maximum
mark in descending
Page 41

Problem Title: Salesmen from New York

Write a query to create a view for those salesmen belongs to the city New York.
Refer the following schema

Sample table: salesman

Salesman_id name city commission


5001 James Hoog New York 0.15
5002 Nail Knite Paris 0.13
5005 Pit Alex London 0.11
5006 Mc Lyon Paris 0.14
5007 Paul Adam Rome 0.13
5003 Lauson Hen San Jose 0.12
Problem Title: Create Index on Customer table

Create an index named customer_name for the cust_name column of the customer table
Refer the following schema
Page 42

Week 9 - RDBMS Concepts and SQL & Introduction to Java

9.1 Topics and Duration


Learning Practice
Topics Sub-Topics
Duration Duration
RDBMS Concepts and SQL Using Oracle

About Sequences, Creating


Sequences, Altering Sequences,
120 60
Using Sequences, Dropping
Sequences

Sequence, Synonym
About Synonyms, Creating
Synonyms, Using Synonyms in
30 30
DML Statements, Dropping
Synonyms

Data Control Language


GRANT, REVOKE 30 30
Statements

Introduction to Java

Features of Java, Java Runtime


Introduction to Java 240 60
Environment, Developing software
in Java

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

9.2 Learning Reference

Sub-Topics Reference Link


RDBMS Concepts and SQL Using Oracle

About Sequences, Link# 1


Creating Sequences, https://www.techonthenet.com/oracle/sequences.php
Altering Sequences,
Using Sequences,
Dropping Sequences
Page 43

About Synonyms, Link# 1


Creating Synonyms, https://www.techonthenet.com/oracle/synonyms.php
Using Synonyms in DML
Statements, Dropping
Synonyms

Introduction to Java
Features of Java, Java
Runtime Environment,
Developing software in Link# 1
Java
https://www.javatpoint.com/features-of-java

Link# 2

https://www.ibm.com/cloud/learn/jre

9.3 Hands-On

Objectives

After completing these exercises, you will be able to:


 Create and Manage Sequences
 Create and Manage Synonyms
 Work with Data Control Language Statements

Estimated Time to Complete these Labs

120 Minutes

Problem Title: Create Sequence

Write a PL/SQL query to create an ascending sequence called id_seq, starting from 10,
incrementing by 10, minimum value 10, maximum value 100.

Problem Title: Use Sequence in a Table Column

Create a new table called tasks with the below DDL query
CREATE TABLE tasks(
id NUMBER PRIMARY KEY,
Page 44

title VARCHAR2(255) NOT NULL


);
Create a sequence called task_id_seq for the id column of the tasks table and use it while
inserting records to the tasks table:

Refer below schema

Create a synonym called stocks for the inventories table and use it in place of the actual table
name in the select query.
Page 45

Problem Title: Granting all privileges to a new user

Create a new user called super with a password super@123 and grant all privileges to
the super user. Later query the super user’s privileges.

Introduction to Java

Objectives

After completing these exercises, you will be able to:


 Compile and execute Java programs
 Understand the structure of Java program, usage identifiers, data types.

Estimated Time to Complete these Labs

60 Minutes

Problem Title: Print Name

Write a Java program to print 'Hello' on screen and then print your name on a separate line.
Sample Output 1:
Hello
Alex.

Problem Title: Divide Numbers

Write a Java program to divide two numbers and print on the screen.

Sample Input 1:
50/3
Sample Output 1:
16

Week 10 - Introduction to Java Programming

10.1 Topics and Duration


Page 46

Learning Practice
Topics Sub-Topics
Duration Duration
Introduction to Java Programming

Language Fundamentals Keywords, Primitive Data Types, 420 180


Operators and Assignments, Flow
Control: Java’s Control Statements

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

10.2 Learning Reference


Sub-Topics Reference Link

Introduction to Java Programming


Keywords, Primitive Data Link #1
Types, Operators and https://www.geeksforgeeks.org/data-types-in-java/
Assignments, Flow Control:
Java’s Control Statements Link# 2
https://www.programiz.com/java-programming/variables-literals

Link# 3
https://www.geeksforgeeks.org/java-assignment-operator-with-
examples/

10.3 Hands-On
Objectives

After completing these exercises, you will be able to:


 Work with Primitive Data Types.
 Implement Conditional statements in Java programs
 Work with Operators
 Implement control statements

Estimated Time to Complete these Labs

180 Minutes

Problem Title: Print repeated Text


Page 47

Write a Java program to Print “Hello World” 5 times using for loop.

Sample Output 1:
Hello World
Hello World
Hello World
Hello World
Hello World

Problem Title: Swap Numbers

Write a Java program to swap two numbers.

Sample Input 1:

Input the First Number: 5


Input the Second Number: 6

Sample Output 1:

After Swapping:
First Number : 6
Second Number : 5

Problem Title: Fibonacci Sequence

Construct Fibonacci sequence controlled by a do-while loop

Sample Output 1:

0,1,1,2,3,5,8,13,21,34

Problem Title: Area of Circle

Write a Java program to print the area of a circle.


Radius = 7.5

Sample Output 1:
Area is = 176.71458676442586

Problem Title: Temperature convertor

Write a Java program to convert temperature from Fahrenheit (ex 212) to Celsius degree

Sample Input 1:
Page 48

Given temperature in Fahrenheit: 212

Sample Output 1:
212.0 degree Fahrenheit is equal to 100.0 in Celsius

Week 11 - Introduction to Java Programming

11.1 Topics and Duration

Learning Practice
Topics Sub-Topics
Duration Duration
Introduction to Java Programming

Classes and Objects Classes and Objects, Access 420 180


Specifiers, Constructors - Default
and Parameterized, Method &
Constructor Overloading, this
reference, using static keyword

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

11.2 Learning Reference

Sub-Topics Reference Link


Introduction to Java Programming
Classes and Objects Link# 1
https://www.programiz.com/java-programming/class-objects

Link# 2
https://www.geeksforgeeks.org/constructors-in-java/

Link# 3
https://www.programiz.com/java-programming/static-keyword
Page 49

11.3 Hands-On

Objectives

After completing these exercises, you will be able to:


 Work with Classes and Objects
 Define constructors in Java programs
 Work with Object Initializers
 Implement various method parameters
 Implement Function Overriding, Overloading
 Work with this, Static keyword, Class usage.

Estimated Time to Complete these Labs

180 Minutes

Problem Title: Product class

Create class ProductTwoNum with two integer values and computes their product by calling the
instance method int computeProd(int num1, int num2).

Sample Input 1
Num1 : 20
Num2 : 3
Sample Output 1
The product of 20 and 3 is 60.

Problem Title: Area calculation and print details

Write a program to print the area of two rectangles having sides (4,5) and (5,8) respectively by
creating a class named ‘Rectangle’ with a method named ‘rectangleArea’ which returns the area
and length and breadth passed as parameters to its constructor.
Sample Output 1
Print the area of the Rectangle

Problem Description:

Smith has library of magazines. He wants to maintain information of magazines. Write a java
program for this. Create a class Magazine with the following attributes:
id, title, author, price
Methods:
Page 50

 Parameterized constructor
 displaydetails() to display the details of the magazines
 discountedPrice() : pass the discount percent, calculate the discount on price and return
the amount to be paid after discount

Magazine
-id:int
-title:String
-author:String
-price:double
+displayDetails():void
+discountedPrice(discountPercentage):double

Here attributes are private variables and methods are public


Create class Main, Initialize magazine object using parameterized constructor and invoke
discountedPrice() and displayDetails() methods.

Sample Input 1

If below sample values are set for magazine object

Id Title Author Price


23 Journey of Life Michael Jo 600

Enter discount percentage: 5


Sample Output 1
Magazine Details:
Id: 23
Title: Journey of Life
Author: Michael Jo
Price: 570

Problem Description:

Alina has to keep track of customers data who are buying products from her shop. For this create
a class Customer with the following attributes:
customerId, customerName, contactNo, paymentDone

Methods:
 Parameterized constructor
 display customer details
 return the payment done by a customer (getter)
Page 51

Customer
-customerId:int
-customerName:String
-contactNo:String
-paymentDone:double
+displayDetails():void
+getPaymentDone():double

Here, attributes are private variables and methods are public. Write parameterized constructor
with parameter names as:
Customer(customerId,customerName,contactNo,paymentDone)

Create class Main, create 3 customers object, and perform the following operations

 Display total payment done


 Display customer details who has paid highest payment

Create two separate functions for above 2 tasks within Main class as

Main
+displayTotalPayment():void
+highestPaymentDone():void

Sample Input 1

If below sample values are set for customer object

customerId customerName contactNo paymentDone


56 Anjali 9123456789 700
89 Sujoy 8123456790 360
22 Manju 7654389129 1200

Sample Output 1
Total payment done is 2260 Rs.
Highest payment done customer details:
Customer Id: 22
Customer Name: Manju
Contact number: 7654389129
Payment done: 1200
Page 52

Week 12 - Introduction to Java Programming

12.1 Topics and Duration

Learning Practice
Topics Sub-Topics
Duration Duration
Introduction to Java Programming
120 30
Wrapper Classes, Using
Scanner Class
Strings String Handling functions 180 90
Array One dimensional array, Array of 120 60
Objects, Using varargs, Using
Arrays class

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

12.2 Learning Reference

Sub-Topics Reference Link


Introduction to Java Programming
Link# 1
Wrapper Classes, Using https://www.programiz.com/java-programming/wrapper
Scanner Class
Link# 2
https://www.geeksforgeeks.org/scanner-class-in-java/

Strings Link# 1
http://www.corejavaguru.com/java/strings/stringfunctions

Link# 2
https://www.edureka.co/blog/java-string

Arrays Link# 1
https://www.geeksforgeeks.org/arrays-in-java/

Link# 2
https://www.geeksforgeeks.org/array-class-in-java/

Link# 3
Page 53

https://www.geeksforgeeks.org/variable-arguments-varargs-in-
java/

12.3 Hands-On

Objectives

After completing these exercises, you will be able to:


 Work with String and StringBuilder class
 Use string handling methods
 Work with different kinds of array, usage of varargs

Estimated Time to Complete these Labs

180 Minutes

Problem Title: Palindrome check

Write a program to Identify string given by user is palindrome or not.

Sample Input 1
Enter String: Malayalam
Sample Output 1
Given String is palindrome
Sample Input 2
Enter String: Test
Sample Output 2
Given String is not palindrome

Problem Description:

Write a java program with method checkEnding() that takes two strings and returns true if the first
string ends with the second string, otherwise return false.
Sample Input 1
checkEnding(“abc”,”bc”);
Sample Output 1
true
Sample Input 2
checkEnding(“samurai”,”pi”);
Sample Output 2
False
Page 54

Problem Description:
Write a Java program to calculate the average value of array elements.

Sample Output 1
Average value of the array elements is: 7.0

Problem Description:
Write a Java program to find the maximum and minimum value of an array.

Sample Output 1

Original Array: [25, 14, 56, 15, 36, 56, 77, 18, 29, 49]
Maximum value for the above array = 77
Minimum value for the above array = 14

Week 13 - Introduction to Java Programming

13.1 Topics and Duration

Learning Practice
Topics Sub-Topics
Duration Duration
Introduction to Java Programming
Collections Collection basics, Set, HashSet, 420 180
Map, HashMap, List, Array List

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

13.2 Learning Reference

Sub-Topics Reference Link


Introduction to Java Programming
Collection basics, Set, Link# 1
HashSet, Map, HashMap, https://www.javatpoint.com/collections-in-java
List, Array List
Page 55

13.3 Hands-On

Objectives

After completing these exercises, you will be able to:


 Identify collection classes that can be used in Java programs
 Work with List, ArrayList.
 Work with Set, HashSet, Map, HashMap in Java programs

Estimated Time to Complete these Labs:

180 Minutes

Problem Description:

Write a Java program to create a new array list, add some elements (string) and print out the
collection.

Sample Output 1:
[Red, Green, Orange, White, Black]

Problem Description:

Write a Java program to iterate through all elements in a hash Map.

Sample Output 1:
Red
White
Pink
Yellow
Black
Green

Problem Description:

Declare an ArrayList called numList to hold values of Integer type. Write code such that the
duplicate values are removed.

Sample Input 1
[1,2,3,2,1,4,5,6,6,7,8,8]

Sample Output 1
[1,2,3,4,5,6,7,8]
Page 56

Problem Description:

Write a program to store only unique elements of Employee type in the collection, the uniqueness
of employee must be identified by the employeeId, the employee must have other properties like
name, salary & designation. Print all the employees stored in the collection.
Hint: Use Set<Employee> set = new HashSet<Employee>(); to store the employee
object

Sample Output 1
Employee Id = 100, Name = Alex, Salary = 25000, Designation = Manager
Employee Id = 101, Name = Bruce, Salary = 15000, Designation = Tester

Problem Description:

Use the comparator and sort the employee’s id in ascending and descending order and print the
employees in both ascending & descending order

Hint: Use List<Employee> list = new ArrayList<Employee>(); to store the employee and
Collections.sort(list, comparatorType1) & Collections.sort(list, comparatorType2) to sort the
elements in ascending & descending order, here comparatorType1 & comparatorType2
are instances of Comparator<Employee> implementation that sorts the employeeId in
ascending & descending order respectively.

Sample Code Snippet

/*list to maintain employee instances*/


List<Employee> list = new ArrayList<Employee>();
// store employees into the list
/*comparatorType1 is a local inner class */
Comparator<Employee> comparatorType1 = new Comparator<Employee>(){
public int compare(Employee e1, Employee e2) {
return Integer.compare(e1.getId(), e2.getId());
}
};
// call sort on the list having employees
Collections.sort(list, comparatorType1);
// print the list to see output in ascending order
// implement comparatorType2
// call sort on the list having employees
// print the list to see output in descending order

Expected Output:
Page 57

Ascending Order:
Employee Id = 100, Name = Alex, Salary = 25000, Designation = Manager
Employee Id = 101, Name = Bruce, Salary = 15000, Designation = Tester
Employee Id = 102, Name = Amith, Salary = 20000, Designation = Developer

Descending Order:
Employee Id = 102, Name = Amith, Salary = 20000, Designation = Developer
Employee Id = 101, Name = Bruce, Salary = 15000, Designation = Tester
Employee Id = 100, Name = Alex, Salary = 25000, Designation = Manager

Week 14 - Introduction to Java Programming

14.1 Topics and Duration

Learning Practice
Topics Sub-Topics
Duration Duration
Introduction to Java Programming
JDBC Basics, JDBC architecture, 420 180
JDBC JDBC Drivers. Process SQL with
JDBC

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

14.2 Learning Reference

Sub-Topics Reference Link


Introduction to Java Programming

JDBC Basics, Link# 1


JDBC https://www.geeksforgeeks.org/introduction-to-jdbc/
architecture,
JDBC
Link# 2
Drivers.
Process SQL https://howtodoinjava.com/jdbc-tutorials
with JDBC
Link# 3
Page 58

https://docs.oracle.com/javase/tutorial/jdbc/basics/processingsqlstatements.html

14.3 Hands-On

Objectives

After completing these exercises, you will be able to:


 Understand JDBC components
 Creating JDBC connection, Statement objects usage in Java programs

Estimated Time to Complete these Labs:

180 Minutes

Problem Description:

Create a menu that will display 4 options


a. Store
b. Display by id
c. Delete by id
d. Exit
The menu should repeat until you enter exit, however the other options must perform
operations like storing in the collection, displaying the item based on the id, deleting the
item based on id. The item has to be an Employee with properties like id, name, salary
and designation. Employee properties must be initialized dynamically

Sample Code snippet

public static void main(String[] args) {


// other codes
//scanner to take input from keyboard
Scanner scanner = new Scanner(System.in);
int option = 0;
//other codes
//menu options
do {
System.out.println("1: Store");
System.out.println("2: Display by id");
System.out.println("3: Delete by id");
System.out.println("4: Exit");
System.out.println("Enter options:-");
int option = scanner.nextInt();
switch(option) {
// write cases for the options
Page 59

}
} while(option != 4);
//other codes
}

Problem Description:

Create a table Student with structure as below


Fields DataType Constraint
studentId int primary Key
StudentName varchar(10
Branch varchar(15)
Percentage double

Insert few values into the table from backend as below


student Id studentName Branch Percentage
100 Ann Electronics 70.5
101 Ben Computers 71.3
102 Ken Mech 60
103 Ram Computers 90
104 Bhim Mech 72
105 Shyam Computers 86

Define a Java Class Main and in main method write code to load driver and establish connection
with database.
Using proper SQL Query, retrieve all student records whose branch is Computers and Percentage
above 85 and print in the form as below

Sample Output
studentId studentName Branch Percentage
103 Ram Computers 90
105 Shyam Computers 86

Week 15 - Introduction to Java Programming

15.1 Topics and Duration

Learning Practice
Topics Sub-Topics
Duration Duration
Introduction to Java Programming
Page 60

JDBC Introduction JDBC Driver, Create Connection, 420 180


Query, Update

Note: Blue colored text under Sub-Topics in the above table indicates that faculty has to
demonstrate based on those and make students practice, samples provided for faculty’s reference
under the Hands-On section.

15.2 Learning Reference

Sub-Topics Reference Link


Introduction to Java Programming

JDBC Driver, Create Link# 1


Connection, Query, Update https://www.javatpoint.com/java-jdbc

Link# 2
https://howtodoinjava.com/jdbc-tutorials

15.3 Hands-On

Objectives

After completing these exercises, you will be able to:


 Understand JDBC components
 Creating JDBC connection, Statement objects usage in Java programs

Estimated Time to Complete these Labs:

180 Minutes

Problem Description:

Create a menu that will display 4 options


a. Store
b. Display by id
c. Delete by id
d. Exit
The menu should repeat until you enter exit, however the other options must perform
operations like storing in the collection, displaying the item based on the id, deleting the
Page 61

item based on id. The item has to be an Employee with properties like id, name, salary
and designation. Employee properties must be initialized dynamically

Sample Code snippet

public static void main(String[] args) {


// other codes
//scanner to take input from keyboard
Scanner scanner = new Scanner(System.in);
int option = 0;
//other codes
//menu options
do {
System.out.println("1: Store");
System.out.println("2: Display by id");
System.out.println("3: Delete by id");
System.out.println("4: Exit");
System.out.println("Enter options:-");
int option = scanner.nextInt();
switch(option) {
// write cases for the options
}
} while(option != 4);
//other codes
}

Problem Description:

Write the menu driven program using JDBC which will have following options
a. Store
b. Display by id
c. Delete by id
d. Update salary by id
e. Exit
The menu should repeat until you enter exit, however the other options must perform
operation like storing in the database, displaying the item based on the id, deleting the
item based on id, updating the salary of the item based on id. The item has to be an
Employee with properties like id, name, salary and designation. Employee properties
must be initialized dynamically and also program must ask the id dynamically to
perform display and delete and for update id and salary must be dynamic.

Sample Table Structure

EMPLOYEE_ID EMPLOYEE_NAME EMPLOYEE_SALARY


100 Harish 28000
Page 62

101 Vijay 25000


102 Ajay 31000

Sample Code snippet

class DBOperations {
// connection method to reuse the db-connection
public static Connection establishConnection() {
// load the driver & establish the connection using datasource informations
// return the connection object
}
public void store(Employee employee) {
// use insert query and store all the values of employee into the database
}
public Employee fetchById(int id) {
// use select query and fetch the result for the matching id
// store the result by initializing employee instances & return to main
// return null if id is not found
}
public int updateSalary(int id, double salary) {
// use update query & update the salary based on the id
// return 1 if updated else -1 if id is not found
}
public int deleteById(int id) {
// use delete query and delete the record by id
// return 1 on successful deletion
// return -1 if id not found
}
// main method can be inside DBOperations or in separate class
public static void main(String[] args) {
// other codes
// create object of DBOperations to call the methods based on options
//scanner to take input from keyboard
Scanner scanner = new Scanner(System.in);
int option = 0;
//other codes
//menu options
do {
System.out.println("1: Store");
System.out.println("2: Display by id");
System.out.println("3: Delete by id");
System.out.println("4: Update salary by id");
System.out.println("5: Exit");
System.out.println("Enter options:-");
int option = scanner.nextInt();
switch(option) {
// write cases for the options
// call methods of DBOperations for appropriate cases
Page 63

}
} while(option != 5);
//other codes
}

Expected Output:

1: Store
2: Display by id
3: Delete by id
4: Update salary by id
5: Exit
Enter options:
1
Enter id
100
Enter name
Harish
Enter salary
28000
---- Stored Successfully -----
1: Store
2: Display by id
3: Delete by id
4: Update salary by id
5: Exit
Enter options:
2
Enter id of the employee
100
--- Fetching records for 100 ----
Name: Harish
Salary: 28000
1: Store
2: Display by id
3: Delete by id
4: Update salary by id
5: Exit
Enter options:
/* Try other options which does operation on database */

You might also like