0% found this document useful (0 votes)
15 views

Language Translator

The document is a journal submitted by Darshan Parmar for the Bachelor of Science in Information Technology program, covering topics such as Blockchain, Advanced Web Development, Android, Cyber Crime, and Intellectual Property Rights. It includes practical exercises on setting up MetaMask, developing smart contracts with Truffle, implementing RSA encryption, and creating a Node.js server with a RESTful API. The journal serves as a partial fulfillment of the degree requirements for the academic year 2024-2025.

Uploaded by

darshuparmar67
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 (0 votes)
15 views

Language Translator

The document is a journal submitted by Darshan Parmar for the Bachelor of Science in Information Technology program, covering topics such as Blockchain, Advanced Web Development, Android, Cyber Crime, and Intellectual Property Rights. It includes practical exercises on setting up MetaMask, developing smart contracts with Truffle, implementing RSA encryption, and creating a Node.js server with a RESTful API. The journal serves as a partial fulfillment of the degree requirements for the academic year 2024-2025.

Uploaded by

darshuparmar67
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/ 105

JOURNAL

ON
BLOCKCHAIN ADVANCE WEB DEVELOPMENT ANDROID
CYBER CRIME AND INTELLECTUAL PROPERTY RIGHTS
IN THE PROGRAMME
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
SUBMITTED BY
DARSHAN PARMAR
B.SC. (IT)
SEMESTER VI
UNDER THE GUIDANCE OF
DR. VISHESH SHRIVASTAVA MR. MANISH KUMAR SINGH
MR. PRASHANT CHAUBEY DR. JANHAVI RAUT
ACADEMIC YEAR
2024 – 2025
DECLARATION

I hereby declare that the journal of, BLOCKCHAIN, ADVANCE


WEB DEVELOPMENT, ANDROID and CYBER CRIME AND
INTELLECTUAL PROPERTY RIGHTS done at KES Shroff College, has
not been in any case duplicated to submit to any other university for the
award of any degree. To the best of my knowledge other than me, no one
has submitted to any other university.

The project is done in partial fulfillment of the requirements for the


award
of degree of
BACHELOR OF SCIENCE in INFORMATION TECHNOLOGY
to be submitted as semester-VI project as part of our curriculum.

DARSHAN PARMAR
JOURNAL
ON
BLOCKCHAIN
IN THE PROGRAMME
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
SUBMITTED BY
DARSHAN PARMAR
B.SC. (IT)

SEMESTER VI
UNDER THE GUIDANCE OF
MR. MANISH KUMAR SINGH

ACADEMIC YEAR
2024 – 2025
CERTIFICATE

This is to certify that Mr. DARSHAN PARMAR of THIRD year of


Bachelor of Science in Information Technology, Roll No.TDIT042A
of Semester VI (2024 - 2025) has successfully completed the Journal of
the subject BLOCKCHAIN as per the guidelines of KES’ Shroff College
of Arts and Commerce, Kandivali (W), Mumbai-400067.

Teacher In-charge Principal


Mr. Manish Kumar Singh Dr. Lily Bhushan
INDEX

Sr. No. Practical Date

1 Setup MetaMask and Create a wallet in the MetaMask


perform the balance transfer between the accounts.

2 To set up a development environment using Truffle and


Ganache and write, deploy, and test a simple smart contract
on the Ethereum blockchain.

3 Implementation and Validation of Blockchain.

4 Implementation of RSA.

5 Solidity Program Addition of Two Numbers.


PRACTICAL 1:
AIM: Setup MetaMask and Create a wallet in the MetaMask perform the
balance transfer between the accounts.

Step 1: Add extension of metamask from chrome.

Step 2: Create password in which you can enter the new password and confirm password and
then click on create a new wallet.
Step 3: Next select the secure wallet and watch the video tomlearn about your secret recovery
phrase and how to keep your wallet safe.

Step 4: Click on the reveal secret recovery phrase.


Step 5: Write down the 12-word Secret Recovery Phrase and click on the next.
Step 6: Previously you already note down the 12-words secret recovery phrase and then match to
each other and then click on confirm.

Step 7: 12-words secret recovery phrase matches and then Successful wallet creation is display.
Step 8: Successfully Install the Metamask and click on the Next and then Done.

Step 9: After Successfully installation of Metamask the below interface is shown.


Step 10: Click on the Right Corner on three dot then pop up will open and then Select account
detail.

Step 11: Click on the Settings and then Click on the Ethereum Mainnet.
Step 12: Click on the Show test network and then Add a custom network.
Network Name: Localhost 8545
Chain ID: 1337
Currency Symbol: ETH
Step 13: Click on the Default RPC URL and Add RPC URL.

Step 14: Enter the RPC URL take it from the Ganache and enter into it and click on the Add
URL.
RPC URL: HTTP://127.0.0.1:7545

Step 15: Click on the Save.


Step 16: Create a second account this is first by default account.

Step 17: Click on the Add account or hardware wallet and click on add a new Ethereum account.

Step 18: Give the account name and click on Add Account.
Step 19: Finally your account is created.

Step 20: Import the account to get the balance and transfer between one account to another.

Step 21: Copy the private key from the Ganache and paste into it and click on the import.
Click on account →Add account or hardware wallet →Import account
After Importing the balance is shown 100 ETH.
Transfer the 50 ETH from Account 2 to Account 1

Click on send →account 1 →put the amount →confirm


PRACTICAL 2:
AIM: To set up a development environment using Truffle and Ganache and
write, deploy, and test a simple smart contract on the Ethereum blockchain.
1. mkdir meta-coin - Create a new directory called 'meta-coin'.
2. cd meta-coin - Change to the 'meta-coin' directory.
3. truffle unbox metacoin - Unbox the MetaCoin project template using Truffle.
4. truffle test ./test/metacoin.js - Run the test file 'metacoin.js' for the MetaCoin project.
5. truffle compile - Compile the smart contracts in the MetaCoin project.

6. truffle migrate - Deploy the contracts to the development network.


7. truffle console - Open the Truffle console to interact with the contracts.
8. truffle console - Open the Truffle console to interact with the contracts.
9. let instance = await MetaCoin.deployed() - Get the deployed instance of the MetaCoin
contract.
10. let accounts = await web3.eth.getAccounts() - Retrieve the available Ethereum
accounts.
11. let balance = await instance.getBalance(accounts[0]) - Get the balance of the first
account.
12. balance.toNumber() - Convert the balance to a number.
13. instance.sendCoin(accounts[1], 500) - Send 500 MetaCoins to the second account.
14. let received = await instance.getBalance(accounts[1]) - Get the balance of the second
account after receiving the coins.
15. received.toNumber() - Convert the received balance to a number.
16. let newBalance = await instance.getBalance(accounts[0]) - Get the new balance of the
first account after sending coins.
17. newBalance.toNumber() - Convert the new balance of the first account to a number.
The image shows the "Events" tab in Ganache, displaying two events: "Transfer"
from the "MetaCoin" contract and "Encoded Event" from another contract, both
with transaction hashes, log indices, and block timestamps.
PRACTICAL 3:
AIM: Implementation and Validation of Blockchain.

CODE:

import hashlib
def hashGenrator(data):
result=hashlib.sha256(data.encode())
return result.hexdigest()
class Block:
def _init_(self, data, hash, prev_hash):
self.data=data
self.hash=hash
self.prev_hash=prev_hash

class Blockchain():
def _init_(self):
hash_start=hashGenrator("abc_start")
hash_last=hashGenrator("abc_last")

Gensis=Block("gen_data", hash_start, hash_last)


self.chain=[Gensis]

def addBlock(self, data):


prev_hash=self.chain[-1].hash
hash=hashGenrator(prev_hash)
block=Block(data, hash, prev_hash)
self.chain.append(block)

def validateChain(self):
for i in range(1, len(self.chain)):
current_block = self.chain[i]
prev_block = self.chain[i - 1]
if current_block.prev_hash != prev_block.hash:
return False
return True

bc=Blockchain()
bc.addBlock('B1')
bc.addBlock('B2')
bc.addBlock('B3')

for block in bc.chain:


print(block._dict_)
bc.chain[1].prev_hash = "tampered_hash"

print("Checking the Validation of Blockchain")


is_valid = bc.validateChain()
print("Is the blockchain valid?", is_valid)

Output:

Blockchain Validation is True.

Blockchain Validation is False.


PRACTICAL 4:
AIM: Implementation of RSA.
from math import gcd
# defining a function to perform RSA approach

def RSA(p: int, q: int, message: int):


n=p*q
t = (p - 1) * (q - 1) # calculating totient, t
for i in range(2, t): # selecting public key, e
if gcd(i, t) == 1:
e=i
break
j = 0 # selecting private key, d
while True:
if (j * e) % t == 1:
d=j
break
j += 1
ct = (message ** e) % n # performing encryption
print(f"Encrypted message is {ct}")
mes = (ct ** d) % n # performing decryption
print(f"Decrypted message is {mes}")
RSA(p=53, q=59, message=89) # Testcase - 1
# Testcase - 2
RSA(p=3, q=7, message=12)

Output:
PRACTICAL 5:
AIM: Solidity Program Addition of Two Numbers.

// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.26;

contract Test {

// Declaring state variables


uint public var1;
uint public var2;
uint public sum;

// Function to set values and compute sum


function set(uint x, uint y) public {
var1 = x;
var2 = y;
sum = var1 + var2;

// Function to `get the sum


function get() public view returns (uint) {
return sum;
}
}
OUTPUT:
JOURNAL
ON
ADVANCE WEB DEVELOPMENT
IN THE PROGRAMME
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
SUBMITTED BY
DARSHAN PARMAR
B.SC. (IT)

SEMESTER VI
UNDER THE GUIDANCE OF
MR. PRASHANT CHAUBEY

ACADEMIC YEAR
2024 – 2025
CERTIFICATE

This is to certify that Mr. DARSHAN PARMAR of THIRD year of


Bachelor of Science in Information Technology, Roll No.TDIT042A
of Semester VI (2024 - 2025) has successfully completed the Journal of
the subject ADVANCE WEB DEVELOPMENT as per the guidelines of
KES’ Shroff College of Arts and Commerce, Kandivali (W), Mumbai-
400067.

Teacher In-charge Principal


Mr. Prashant Chaubey Dr. Lily Bhushan
INDEX

Sr. No. Practical Date

1. Set up a Node.js server.

2. Create a simple RESTful API with Express.js.

3. Building a basic Angular application.

4. Performing CRUD operations with MongoDB.

5. Integrating MongoDB with a Node.js application using


Mongoose.
PRACTICAL 1:

AIM: Set up a Node.js server.

CODE:

const http = require('http');

http.createServer(function(request, response){
response.write("<h1> HELLO TYBSCIT </h1>");
response.end();
}).listen(8090, function(){
console.log('Server running at http://127.0.0.1:8090/');
});

OUTPUT:
PRACTICAL 2:
AIM: Create a simple RESTful API with Express.js.
CODE:
const express= require('express');
const mysql= require('mysql');
const bodyparser = require('body-parser');

app=express();

db = mysql.createConnection({
host :'localhost',
user : 'root',
password :'student',
database :'students'
});

app.use(bodyparser.json());

db.connect(function(err){
if (err){
console.error(err);
return ;
}
console.log('Connection Established');
});

/* Fetching all the data from database */


app.get('/fetchAll',function(req,res){
db.query('Select * from student', function(err , result){
if(err){
res.status(500).json({error :err.message});
return ;
}
res.status(200).json(result);
});
});

/* Fetching Data by specific id using where clause */


app.get('/fetch/:student_id',function(req,res){
db.query('Select * from student where student_id= ?',[req.params.student_id],function(err ,
result){
if(err){
res.status(500).json({error : err.message});
return;
}
if (result.length === 0){
res.status(404).json({message : "Data not Found"});
return;
}
res.status(200).json(result);
});
});

/** Inserting Data into table*/


app.post('/addData',function(req,res){
sid=req.body.student_id;
sname=req.body.name;
scity=req.body.city;
saddr=req.body.addr;
spin=req.body.pin;
db.query('Insert into student (student_id,name,city,addr,pin)
values(?,?,?,?,?)',[sid,sname,scity,saddr,spin],function(err,result){
if(err){
res.status(500).json({error: err.message});
return;
}
if(result.length === 0){
res.status(404).json({message: "Data Table not found"});
return;
}
res.status(200).json(result);
});
});
/** Updating Data of Table using the unique id */
app.put('/updateData/:student_id', function(req, res){
sid = req.params.student_id;
sname = req.body.name;
scity = req.body.city;
saddr = req.body.addr;
spin = req.body.pin;

db.query('update student set name = ?, city = ?, addr = ? , pin = ? where student_id = ?',
[sname, scity, saddr, spin,sid] ,function(err, result){
if(err){
res.status(500).json({error: err.message});
return;
}
if(result.affectedRows === 0){
res.status(404).json({messsage: 'Table Data not updated'});
return;
}
res.status(200).json(result);
});
});

/** Deleting the Data of Table using the student_id */


app.delete('/deleteData/:student_id', function(req, res){
db.query('delete from student where student_id = ?', [req.params.student_id], function(err,
result){
if(err){
res.status(500).json({error: err.message});
return;
}
if(result.affectedRows === 0){
res.status(404).json({messsage: 'Data not deleted'});
return;
}
res.status(200).json(result);
});
});
app.listen(8080,function(){
console.log('Server started at port number : 8080');
});

OUTPUT:
Inserting the data in table student.
Fetching all the data from the table.

Fetching data using id.


To verify the id is updated:
Delete the data by id:

Verify the data is deleted:


PRACTICAL 3:
AIM: Building a basic Angular application.

CODE:
app.component.ts:
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';

@Component({
selector: 'app-root',
//imports: [RouterOutlet],
templateUrl: './app.component.html',
styleUrl: './app.component.css'
})
export class AppComponent {
title = 'EventHandler';
msg=' ';
onC(){
this.msg="JAI SHREE RAM";
}
onH(){
this.msg="Har Har MAhadev";
}
}

app.component.html:

<h1> {{msg}} </h1>


<button (click)="onC()"> Click Here </button>
<div (mouseover)="onH()"> MouseOver </div>

app.routes.ts:
import { Routes } from '@angular/router';

export const routes: Routes = [];

OUTPUT:
When we will click on the button then: When we hover the mouse then:
PRACTICAL 4:
AIM: Performing CRUD operations with Mongo DB.
CODE:
[

Creating the Collection:

Inserting data in to collection:

Retrieving the data from database in MongoDB:


Update the data in MongoDB.

Deleting the Data from Collection in MongoDB:


PRACTICAL 5:
AIM: Integrating MongoDB with a Node.js application using
Mongoose.
CODE:
const express = require("express");
const mongo= require("mongoose");
app = express();
app.use(express.json());
mongo.connect("mongodb://localhost:27017/ram")
.then(()=>console.log("Connected Successfully with mongodb.."))
.catch(err=>console.log("Unable to Connect with Mongo due to : ",err));
userSchema = mongo.Schema({
name : String,
email : String
});
user2 = mongo.model("user",userSchema);
app.listen(5000,()=>{
console.log("Server running at 5000");
});
app.post("/user",async (req,res)=>{ // Create User
try{
user = new user2( req.body );
await user.save();
res.status(200).json(user);
}
catch(err){
res.json({"error" : err.message});
}
});
app.get("/users",async (req,res)=>{ // Get all Users
try{
users = await user2.find();
res.json(users);
}
catch(err){
res.json({"error" : err.message});
}
});
app.get("/User/:id",async(req,res)=>{ // Get User by id
try{
userdata= await user2.findById(req.params.id.trim());
res.json(userdata);
}
catch(err){
res.json({"error" : err.message});
}
});
app.put("/user/:id", async (req, res) => { // Update User by ID
try {
const updatedUser = await user2.findByIdAndUpdate(
req.params.id, // Get the ID from the URL
req.body, // Get new data from the request body
{ new: true, runValidators: true } // Return updated data
);
if (!updatedUser) {
return res.status(404).json({ error: "User not found" });
}
res.json(updatedUser);
} catch (err) {
res.status(500).json({ error: err.message });
}
});
app.delete("/delUser/:id",async(req,res)=>{ // Delete User by ID
try{
await user2.findByIdAndDelete(req.params.id);
res.json({"message": "user deleted"});
}
catch(err) {
res.json({"error" : err.message});
}
});

OUTPUT:
JOURNAL
ON
ANDROID
IN THE PROGRAMME
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
SUBMITTED BY
DARSHAN PARMAR
B.SC. (IT)

SEMESTER VI
UNDER THE GUIDANCE OF
DR. JANHAVI RAUT

ACADEMIC YEAR
2024 – 2025
CERTIFICATE

This is to certify that Mr. DARSHAN PARMAR of THIRD year of Bachelor


of Science in Information Technology, Roll No.TDIT042A of Semester VI
(2024 - 2025) has successfully completed the Journal of the subject ANDROID
as per the guidelines of KES’ Shroff College of Arts and Commerce, Kandivali
(W), Mumbai-400067.

Teacher In-charge Principal


Dr. Janhavi Raut Dr. Lily Bhushan
INDEX

Sr. No. Practical Date


1. Creating Your First Android App: Set up Android Studio and create a
basic "Hello World" app.

2. Creating Android App to implement basic activity and design layout


using xml. (3 buttons Send, Receive, Delete & Toast a message when
click on button).

3. Working with Views and View Groups. (3 layout, FYIT, SYIT and
TYIT. Use Color.xml, String.xml)

4. Introduction to Fragments: Implement fragments within activities to


create Dynamic UI.

5. Implement Implicit and Explicit intents.

6. Implement Media player app in android app. (3 buttons, Play Pause


stop).

7. Implement video playback using Video View.

8. Implementation of Data Persistence using shared preference.

9. Implement Animation using Object Animator.

10. Implement Location based service to retrieve user's current location.


PRACTICAL 1:
AIM: Creating Your First Android App: Set up Android Studio and create a basic
"Hello World" app.
MainActivity.java:
package com.example.hello; tools:context=".MainActivity">

import android.os.Bundle; <TextView

import androidx.activity.EdgeToEdge; android:layout_width="wrap_content"

import android:layout_height="wrap_content"
androidx.appcompat.app.AppCompatActivity; android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="par
public class MainActivity extends ent"
AppCompatActivity {
app:layout_constraintEnd_toEndOf="parent"
@Override
app:layout_constraintStart_toStartOf="parent"
protected void onCreate(Bundle
savedInstanceState) { app:layout_constraintTop_toTopOf="parent" />

super.onCreate(savedInstanceState); </androidx.constraintlayout.widget.ConstraintL
ayout>
EdgeToEdge.enable(this);
setContentView(R.layout.activity_main);
OUTPUT:
}
}

activity_main.xml:
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLa
yout
xmlns:android="http://schemas.android.com/ap
k/res/android"
xmlns:app="http://schemas.android.com/apk/res
-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent"
PRACTICAL 2:
AIM: Creating Android App to implement basic activity and design layout using
xml. (3 buttons Send, Receive, Delete & Toast a message when click on button).

MainActivity.java: Toast.makeText(MainActivity.this,
"Sending Data",
package com.example.toastapplication; Toast.LENGTH_SHORT).show();

import android.os.Bundle; }

import android.view.View; });

import android.widget.Button; btnreceive.setOnClickListener(new


View.OnClickListener() {
import android.widget.Toast;
@Override
import androidx.activity.EdgeToEdge;
public void onClick(View v) {
import
androidx.appcompat.app.AppCompatActivity; Toast.makeText(MainActivity.this,
"Receiving Data",
Toast.LENGTH_SHORT).show();
public class MainActivity extends
AppCompatActivity { }
Button btnsend,btnreceive,btndelete; });
@Override btndelete.setOnClickListener(new
View.OnClickListener() {
protected void onCreate(Bundle
savedInstanceState) { @Override
super.onCreate(savedInstanceState); public void onClick(View v) {
EdgeToEdge.enable(this); Toast.makeText(MainActivity.this,
"Deleting Data",
setContentView(R.layout.activity_main);
Toast.LENGTH_SHORT).show();
btnsend=findViewById(R.id.btnsend);
}
btnreceive=findViewById(R.id.btnreceive);
});
btndelete=findViewById(R.id.btndelete);
}
btnsend.setOnClickListener(new
View.OnClickListener() { }
@Override
public void onClick(View v) {
activity_main.xml: app:layout_constraintTop_toTopOf="parent" />

<?xml version="1.0" encoding="utf-8"?> <Button

<androidx.constraintlayout.widget.ConstraintLa android:id="@+id/btndelete"
yout android:layout_width="103dp"
xmlns:android="http://schemas.android.com/ap
k/res/android" android:layout_height="67dp"

xmlns:app="http://schemas.android.com/apk/res android:layout_marginStart="28dp"
-auto"
android:layout_marginTop="200dp"
xmlns:tools="http://schemas.android.com/tools"
android:text="Delete"
android:id="@+id/main"
app:layout_constraintStart_toEndOf="@+id/btn
android:layout_width="match_parent" receive"

android:layout_height="match_parent" app:layout_constraintTop_toTopOf="parent" />

tools:context=".MainActivity"> </androidx.constraintlayout.widget.ConstraintL
ayout>
<Button
android:id="@+id/btnsend" strings.xml:
android:layout_width="105dp" <resources>
android:layout_height="67dp" <string
android:layout_marginStart="16dp" name="app_name">ToastApplication</string>

android:layout_marginTop="200dp" <string name="btnsend">Sending


Data</string>
android:text="Send"
<string name="btnreceive">Receiving
app:layout_constraintStart_toStartOf="parent" data</string>
app:layout_constraintTop_toTopOf="parent" />
<string name="btndelete">Deleting
<Button Data</string>
android:id="@+id/btnreceive" </resources>
android:layout_width="100dp"
OUTPUT:
android:layout_height="69dp"
android:layout_marginStart="32dp"
android:layout_marginTop="200dp"
android:text="Receive"
app:layout_constraintStart_toEndOf="@+id/btn
send"
PRACTICAL 3:
AIM: Working with Views and View Groups. (3 layout, FYIT, SYIT and TYIT. Use
Color.xml, String.xml).
MainActivity.java: android:layout_height="match_parent"

package com.example.viewapplication; android:textAlignment="center"

import android.os.Bundle; tools:context=".MainActivity">

import androidx.activity.EdgeToEdge; <LinearLayout

import android:id="@+id/linearLayout"
androidx.appcompat.app.AppCompatActivity; android:layout_width="408dp"

public class MainActivity extends android:layout_height="239dp"


AppCompatActivity { android:background="#FFEB3B"
@Override android:orientation="vertical"
protected void onCreate(Bundle
savedInstanceState) { app:layout_constraintEnd_toEndOf="parent"
super.onCreate(savedInstanceState); app:layout_constraintStart_toStartOf="parent"
EdgeToEdge.enable(this); app:layout_constraintTop_toTopOf="parent">
setContentView(R.layout.activity_main); <TextView
} android:id="@+id/tv_1"
} android:layout_width="match_parent"
android:layout_height="151dp"
activity_main.xml:
android:background="#FFEB3B"
<?xml version="1.0" encoding="utf-8"?>
android:text="FYIT"
<androidx.constraintlayout.widget.ConstraintLa
yout android:textAlignment="center"
xmlns:android="http://schemas.android.com/ap
android:textSize="60sp" />
k/res/android"
xmlns:app="http://schemas.android.com/apk/res </LinearLayout>
-auto"
xmlns:tools="http://schemas.android.com/tools" <LinearLayout

android:id="@+id/main" android:id="@+id/linearLayout2"

android:layout_width="match_parent" android:layout_width="406dp"
android:layout_height="248dp"
android:background="#CDDC39" android:text="TYIT"
android:orientation="vertical" android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent" android:textSize="60sp" />
app:layout_constraintStart_toStartOf="parent"
</LinearLayout>
app:layout_constraintTop_toBottomOf="@+id/l
</androidx.constraintlayout.widget.ConstraintL
inearLayout">
ayout>
<TextView
android:id="@+id/tv_2" OUTPUT:
android:layout_width="match_parent"
android:layout_height="158dp"
android:background="#00000000"
android:text="SYIT"
android:textAlignment="center"
android:textSize="60sp" />
</LinearLayout>
<LinearLayout
android:layout_width="409dp"
android:layout_height="242dp"
android:background="#00BCD4"
android:orientation="vertical"

app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/l
inearLayout2">
<TextView
android:id="@+id/textView3"
android:layout_width="match_parent"
android:layout_height="150dp"
PRACTICAL 4:
AIM: Introduction to Fragments: Implement fragments within activities to create
Dynamic UI.
MainActivity.java:
.replace(R.id.fragmentContainerView,
package com.example.fragmentapp; NewsFragment.class,null)
import android.os.Bundle; .setReorderingAllowed(true)
import android.view.View; .addToBackStack("name").commit();
import android.widget.Button; }
import androidx.activity.EdgeToEdge; });
import Button btnSports =findViewById(R.id.btn_2);
androidx.appcompat.app.AppCompatActivity;
btnSports.setOnClickListener(new
import View.OnClickListener(){
androidx.fragment.app.FragmentManager;
public void onClick(View v)
public class MainActivity extends {
AppCompatActivity {
FragmentManager fragmentManager
@Override =getSupportFragmentManager();
protected void onCreate(Bundle fragmentManager.beginTransaction()
savedInstanceState) {
.replace(R.id.fragmentContainerView,
super.onCreate(savedInstanceState); ScienceFragment.class,null).setReorderingAllo
EdgeToEdge.enable(this); wed(true).addToBackStack("name").commit();

setContentView(R.layout.activity_main); }

Button btn1 =findViewById(R.id.btn_1); });

btn1.setOnClickListener(new Button btnNews


View.OnClickListener(){ =findViewById(R.id.btn_3);

public void onClick(View v) btnNews.setOnClickListener(new


View.OnClickListener(){
{
public void onClick(View v)
FragmentManager fragmentManager =
getSupportFragmentManager(); {

fragmentManager.beginTransaction() FragmentManager fragmentManager


=getSupportFragmentManager();
fragmentManager.beginTransaction() <Button
.replace(R.id.fragmentContainerView, android:id="@+id/btn_2"
SportFragment.class,null)
android:layout_width="100dp"
.setReorderingAllowed(true)
android:layout_height="46dp"
.addToBackStack("name").commit();
android:layout_marginStart="36dp"
}
android:layout_marginTop="76dp"
});
android:text="Science"
}
app:layout_constraintStart_toEndOf="@+id/btn
} _1"

activity_main.xml: app:layout_constraintTop_toTopOf="parent" />

<?xml version="1.0" encoding="utf-8"?> <Button

<androidx.constraintlayout.widget.ConstraintLa android:id="@+id/btn_3"
yout xmlns:android android:layout_width="95dp"
="http://schemas.android.com/apk/res/android"
android:layout_height="49dp"
xmlns:app="http://schemas.android.com/apk/res
-auto" android:layout_marginTop="76dp"

xmlns:tools="http://schemas.android.com/tools" android:layout_marginEnd="28dp"

android:id="@+id/main" android:text="Sport"

android:layout_width="match_parent"
app:layout_constraintEnd_toEndOf="parent"
android:layout_height="match_parent" app:layout_constraintTop_toTopOf="parent" />
tools:context=".MainActivity"> <androidx.fragment.app.FragmentContainerVie
<Button w
android:id="@+id/fragmentContainerView"
android:id="@+id/btn_1" android:name="com.example.fragmentapp.New
android:layout_width="98dp" sFragment"

android:layout_height="45dp" android:layout_width="405dp"

android:layout_marginStart="40dp" android:layout_height="510dp"
app:layout_constraintBottom_toBottomOf="par
android:layout_marginTop="76dp" ent"
android:text="News" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> />
</androidx.constraintlayout.widget.ConstraintL android:layout_height="match_parent"
ayout>
tools:context=".SportFragment">

fragment_news.xml: <!-- TODO: Update blank fragment layout -->


<TextView
<?xml version="1.0" encoding="utf-8"?>
android:layout_width="match_parent"
<FrameLayout
xmlns:android="http://schemas.android.com/ap android:layout_height="397dp"
k/res/android"
android:background="#D5AFAF"
xmlns:tools="http://schemas.android.com/tools"
android:text="Sport Fragment"
android:layout_width="match_parent"
android:textAlignment="center"
android:layout_height="match_parent"
android:textColor="#FF5722"
android:textAlignment="center"
android:textSize="48sp" />
tools:context=".NewsFragment">
</FrameLayout>
<!--TODO: Update blank fragment layout -->
<TextView fragment_science.xml:
android:layout_width="match_parent"
<?xml version="1.0" encoding="utf-8"?>
android:layout_height="432dp"
<FrameLayout
android:background="#D5B0B0" xmlns:android="http://schemas.android.com/ap
k/res/android"
android:text="NEWS FRAGMENT"
xmlns:tools="http://schemas.android.com/tools"
android:textAlignment="center"
android:layout_width="match_parent"
android:textColor="#FF5722"
android:layout_height="match_parent"
android:textSize="48sp" />
android:textAlignment="center"
</FrameLayout>
tools:context=".ScienceFragment">
[

fragment_sport.xml: <!--TODO: Update blank fragment layout -->


<?xml version="1.0" encoding="utf-8"?> <TextView
<FrameLayout android:layout_width="match_parent"
xmlns:android="http://schemas.android.com/ap
k/res/android" android:layout_height="164dp"

xmlns:tools="http://schemas.android.com/tools" android:background="#E2BDBD"

android:layout_width="match_parent" android:text="Science Fragment"


android:textAlignment="center"
android:textColor="#FF5722"
android:textSize="48sp" />
</FrameLayout>

OUTPUT:
PRACTICAL 5:
AIM: Implement Implicit and Explicit intents.
MainActivity.java: Intent intent=new
Intent(MainActivity.this, MainActivity2.class);
package com.example.intentexample;
intent.putExtra("data", name);
import android.content.Intent;
startActivity(intent);
import android.os.Bundle;
}
import android.view.View;
});
import android.widget.Button;
}
import android.widget.EditText;
}
import androidx.activity.EdgeToEdge;
MainActivity2.java:
import
androidx.appcompat.app.AppCompatActivity; package com.example.intentexample;
import android.annotation.SuppressLint;
public class MainActivity extends
AppCompatActivity { import android.content.Intent;

Button btn; import android.os.Bundle;

EditText txt; import android.widget.TextView;

@Override import androidx.activity.EdgeToEdge;

protected void onCreate(Bundle import


savedInstanceState) { androidx.appcompat.app.AppCompatActivity;

super.onCreate(savedInstanceState);
public class MainActivity2 extends
EdgeToEdge.enable(this); AppCompatActivity {
setContentView(R.layout.activity_main); TextView txt2;
btn=findViewById(R.id.btn); @SuppressLint("SetTextI18n")
txt=findViewById(R.id.txt); @Override
btn.setOnClickListener(new protected void onCreate(Bundle
View.OnClickListener() { savedInstanceState) {
@Override super.onCreate(savedInstanceState);
public void onClick(View v) { EdgeToEdge.enable(this);
String name=txt.getText().toString(); setContentView(R.layout.activity_main2);
txt2=findViewById(R.id.txt2);
app:layout_constraintBottom_toBottomOf="par
Intent intent=getIntent();
ent"
String receive=
app:layout_constraintEnd_toEndOf="parent"
intent.getStringExtra("data");
app:layout_constraintStart_toStartOf="parent"
txt2.setText("Hello"+receive);
app:layout_constraintTop_toTopOf="parent"
}
app:layout_constraintVertical_bias="0.075" />
}
<Button
activity_main.xml: android:id="@+id/btn"
<?xml version="1.0" encoding="utf-8"?> android:layout_width="178dp"
<androidx.constraintlayout.widget.ConstraintLa android:layout_height="110dp"
yout
xmlns:android="http://schemas.android.com/ap android:text="Send"
k/res/android"
android:textSize="48sp"
xmlns:app="http://schemas.android.com/apk/res app:layout_constraintBottom_toBottomOf="par
-auto" ent"
app:layout_constraintEnd_toEndOf="parent"
xmlns:tools="http://schemas.android.com/tools" app:layout_constraintHorizontal_bias="0.429"
android:id="@+id/main" app:layout_constraintStart_toStartOf="parent"
android:layout_width="match_parent" app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.371" />
android:layout_height="match_parent"
</androidx.constraintlayout.widget.ConstraintL
tools:context=".MainActivity"> ayout>
<EditText
activity_main2.xml:
android:id="@+id/txt"
<?xml version="1.0" encoding="utf-8"?>
android:layout_width="293dp"
<androidx.constraintlayout.widget.ConstraintLa
android:layout_height="106dp" yout
android:ems="10" xmlns:android="http://schemas.android.com/ap
k/res/android"
android:inputType="text" xmlns:app="http://schemas.android.com/apk/res
android:text="Name" -auto"

android:textSize="34sp" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main"
android:layout_width="match_parent"
android:layout_height="match_parent" OUTPUT:
tools:context=".MainActivity2">
<TextView
android:id="@+id/txt2"
android:layout_width="330dp"
android:layout_height="132dp"
android:background="#FFEA00"
android:text="TextView"
android:textSize="48sp"

app:layout_constraintBottom_toBottomOf="par
ent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.417"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.21" />
</androidx.constraintlayout.widget.ConstraintL
ayout>
PRACTICAL 6:
AIM: Implement Media player app in android app. (3 buttons, Play Pause stop).
MainAcitivity.java: MediaPlayer mp=new MediaPlayer();

package com.example.musicplayer; mp.setAudioStreamType(AudioManager.STREAM_


MUSIC);
import android.annotation.SuppressLint;
String path =
import android.media.AudioManager; "android.resource://"+getPackageName()+"/raw/ram
import android.media.MediaPlayer; ";

import android.net.Uri; Uri audioURI=Uri.parse(path);

import android.os.Bundle; try{

import android.view.View; mp.setDataSource(this,audioURI);

import android.widget.Button; mp.prepare();

import androidx.activity.EdgeToEdge; } catch (IOException e) {

import throw new RuntimeException(e);


androidx.appcompat.app.AppCompatActivity; }
import androidx.core.graphics.Insets; pause.setOnClickListener(new
import androidx.core.view.ViewCompat; View.OnClickListener() {

import androidx.core.view.WindowInsetsCompat; @Override

import java.io.IOException; public void onClick(View v) {

public class MainActivity extends mp.pause();


AppCompatActivity { }
@SuppressLint("MissingInflatedId") });
@Override play.setOnClickListener(new
protected void onCreate(Bundle View.OnClickListener() {
savedInstanceState) { @Override
super.onCreate(savedInstanceState); public void onClick(View v) {
EdgeToEdge.enable(this); mp.start();
setContentView(R.layout.activity_main); }
Button play,pause,stop; });
play=findViewById(R.id.play); stop.setOnClickListener(new
pause=findViewById(R.id.pause); View.OnClickListener() {

stop=findViewById(R.id.stop); @Override
public void onClick(View v) { android:layout_width="wrap_content"
mp.pause(); android:layout_height="wrap_content"
mp.seekTo(0); android:layout_marginTop="328dp"
} android:layout_marginEnd="32dp"
}); android:text="Pause"
} app:layout_constraintEnd_toStartOf="@+id/stop"
} app:layout_constraintTop_toTopOf="parent" />
<Button
activity_main.xml: android:id="@+id/stop"
<?xml version="1.0" encoding="utf-8"?> android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/
android" android:layout_marginTop="328dp"

xmlns:app="http://schemas.android.com/apk/res- android:layout_marginEnd="24dp"
auto"
android:text="Stop"
xmlns:tools="http://schemas.android.com/tools"
app:layout_constraintEnd_toEndOf="parent"
android:id="@+id/main"
app:layout_constraintTop_toTopOf="parent" />
android:layout_width="match_parent"
</androidx.constraintlayout.widget.ConstraintLayou
android:layout_height="match_parent" t>

tools:context=".MainActivity"> OUTPUT:
<Button
android:id="@+id/play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginTop="328dp"
android:text="Play"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<Button
android:id="@+id/pause"
PRACTICAL 7:
AIM: Implement video playback using Video View.
MainActivity.java: MediaController mediaController=new
MediaController(this);
package com.example.videoplayer;
videoView.setMediaController(mediaController
import android.annotation.SuppressLint;
);
import android.net.Uri;
mediaController.setAnchorView(videoView);
import android.os.Bundle;
}
import android.widget.MediaController;
}
import android.widget.VideoView;
activity_main.xml:
import androidx.activity.EdgeToEdge;
<?xml version="1.0" encoding="utf-8"?>
import <androidx.constraintlayout.widget.ConstraintLayout
androidx.appcompat.app.AppCompatActivity; xmlns:android="http://schemas.android.com/apk/res/
android"
public class MainActivity extends
xmlns:app="http://schemas.android.com/apk/res-
AppCompatActivity { auto"
@SuppressLint("MissingInflatedId") xmlns:tools="http://schemas.android.com/tools"
@Override android:id="@+id/main"
protected void onCreate(Bundle android:layout_width="match_parent"
savedInstanceState) {
android:layout_height="match_parent"
super.onCreate(savedInstanceState);
tools:context=".MainActivity">
EdgeToEdge.enable(this); <VideoView
setContentView(R.layout.activity_main); android:id="@+id/videoView"
VideoView videoView; android:layout_width="393dp"
videoView=findViewById(R.id.videoView); android:layout_height="645dp"
String path="android.resource://" android:layout_marginStart="16dp"
+getPackageName()+ "/raw/demo";
android:layout_marginTop="16dp"
Uri videoURI= Uri.parse(path);
app:layout_constraintStart_toStartOf="parent"
videoView.setVideoURI(videoURI); app:layout_constraintTop_toTopOf="parent" />
videoView.start(); </androidx.constraintlayout.widget.ConstraintLayou
t>
OUTPUT:

PRACTICAL 8:
AIM: Implementation of Data Persistence using shared preference.
MainActivity.java: import
androidx.appcompat.app.AppCompatActivity;
package com.example.sharedpref;
public class MainActivity extends
import android.annotation.SuppressLint;
AppCompatActivity {
import android.content.Intent;
EditText editText_1,editText_2;
import android.content.SharedPreferences;
Button btn_save;
import android.os.Bundle;
SharedPreferences sharedPreferences;
import android.view.View;
private static final String
import android.widget.Button; SHARED_PREF_NAME="mypref";

import android.widget.EditText; private static final String


KEY_NAME="name";
import android.widget.Toast;
private static final String
import androidx.activity.EdgeToEdge; KEY_EMAIL="email";
@SuppressLint("MissingInflatedId")
@Override Toast.makeText(MainActivity.this,
"Login Success",
protected void onCreate(Bundle
Toast.LENGTH_SHORT).show();
savedInstanceState) {
}
super.onCreate(savedInstanceState);
});
EdgeToEdge.enable(this);
}
setContentView(R.layout.activity_main);
}
editText_1=findViewById(R.id.editText_1);
editText_2=findViewById(R.id.editText_2); activity_main.xml:
btn_save=findViewById(R.id.btn_save); <?xml version="1.0" encoding="utf-8"?>
sharedPreferences=getSharedPreferences(SHAR
ED_PREF_NAME,MODE_PRIVATE); <androidx.constraintlayout.widget.ConstraintLa
yout
String name= xmlns:android="http://schemas.android.com/ap
sharedPreferences.getString(KEY_NAME,null); k/res/android"
if (name != null){ xmlns:app="http://schemas.android.com/apk/res
-auto"
Intent intent=new
Intent(MainActivity.this, HomeActivity.class); xmlns:tools="http://schemas.android.com/tools"
startActivity(intent); android:id="@+id/main"
} android:layout_width="match_parent"
btn_save.setOnClickListener(new android:layout_height="match_parent"
View.OnClickListener() {
tools:context=".MainActivity">
@Override
<EditText
public void onClick(View v) {
android:id="@+id/editText_1"
SharedPreferences.Editor editor=
sharedPreferences.edit(); android:layout_width="252dp"
editor.putString(KEY_NAME,editText_1.getTe android:layout_height="79dp"
xt().toString());
android:layout_marginStart="84dp"
editor.putString(KEY_EMAIL,editText_2.getTe
xt().toString()); android:layout_marginTop="220dp"

editor.apply(); android:ems="10"

Intent intent=new android:inputType="text"


Intent(MainActivity.this, HomeActivity.class); android:text="NAME:"
startActivity(intent);
android:layout_marginTop="92dp"
app:layout_constraintStart_toStartOf="parent"
android:background="#FFEB3B"
app:layout_constraintTop_toTopOf="parent" />
android:text="Register"
<EditText
android:textAlignment="center"
android:id="@+id/editText_2"
android:textSize="34sp"
android:layout_width="250dp"
app:layout_constraintStart_toStartOf="parent"
android:layout_height="78dp"
app:layout_constraintTop_toTopOf="parent" />
android:layout_marginStart="84dp"
</androidx.constraintlayout.widget.ConstraintL
android:layout_marginTop="356dp" ayout>
android:ems="10"
HomeActivity.java:
android:inputType="text"
package com.example.sharedpref;
android:text="Email"
app:layout_constraintStart_toStartOf="parent" import android.content.SharedPreferences;

app:layout_constraintTop_toTopOf="parent" /> import android.os.Bundle;

<Button import android.view.View;

android:id="@+id/btn_save" import android.widget.Button;

android:layout_width="126dp" import android.widget.TextView;

android:layout_height="46dp" import android.widget.Toast;

android:layout_marginEnd="152dp" import androidx.activity.EdgeToEdge;

android:layout_marginBottom="216dp" import
androidx.appcompat.app.AppCompatActivity;
android:text="SAVE"
app:layout_constraintBottom_toBottomOf="par public class HomeActivity extends
ent" AppCompatActivity {

app:layout_constraintEnd_toEndOf="parent" /> TextView tv_2,tv_3;

<TextView Button btn_logout;

android:id="@+id/tv_1" SharedPreferences sharedPreferences;

android:layout_width="220dp" private static final String


SHARED_PREF_NAME="mypref";
android:layout_height="78dp"
private static final String
android:layout_marginStart="116dp" KEY_NAME="name";
private static final String Toast.makeText(HomeActivity.this, "LogOut
KEY_EMAIL="email"; Successfully",Toast.LENGTH_SHORT).show();
@Override }
protected void onCreate(Bundle });
savedInstanceState) {
}
super.onCreate(savedInstanceState);
}
EdgeToEdge.enable(this);
OUTPUT:
setContentView(R.layout.activity_home);
tv_2=findViewById(R.id.tv_2);
tv_3=findViewById(R.id.tv_3);
btn_logout=findViewById(R.id.btn_logout);
sharedPreferences=getSharedPreferences(SHAR
ED_PREF_NAME,MODE_PRIVATE);
String name =
sharedPreferences.getString(KEY_NAME,null);
String email =
sharedPreferences.getString(KEY_EMAIL, null);

if (name != null || email != null){


tv_2.setText("Full Name:"+name);
tv_3.setText("Email Id:"+email);
}
btn_logout.setOnClickListener(new
View.OnClickListener() {
@Override
public void onClick(View v) {
SharedPreferences.Editor editor=
sharedPreferences.edit();
editor.clear();
editor.commit();
finish();
PRACTICAL 9:
AIM: Implement Animation using Object Animator.
MainActivity.java: btnScale=findViewById(R.id.btnScale);
package com.example.animationapplicaation; btnAlpha=findViewById(R.id.btnAlpha);
import android.annotation.SuppressLint; btnTranslate.setOnClickListener(new
View.OnClickListener() {
import android.os.Bundle;
@Override
import android.view.View;
public void onClick(View v) {
import android.view.animation.Animation;
Animation translate= AnimationUtils.
import android.view.animation.AnimationUtils;
loadAnimation(getApplicationContext(),R.anim
import android.widget.Button; .translate);

import android.widget.TextView; txtAnim.startAnimation(translate);

import androidx.activity.EdgeToEdge; }

import });
androidx.appcompat.app.AppCompatActivity;
btnRotate.setOnClickListener(new
View.OnClickListener() {
public class MainActivity extends
AppCompatActivity { @Override

TextView txtAnim; public void onClick(View v) {

Button Animation
btnTranslate,btnRotate,btnScale,btnAlpha; rotate=AnimationUtils.loadAnimation(getAppli
cationContext(),R.anim.rotate);
@SuppressLint("MissingInflatedId")
txtAnim.startAnimation(rotate);
@Override
}
protected void onCreate(Bundle
savedInstanceState) { });

super.onCreate(savedInstanceState); btnScale.setOnClickListener(new
View.OnClickListener() {
EdgeToEdge.enable(this);
@Override
setContentView(R.layout.activity_main);
public void onClick(View v) {
txtAnim=findViewById(R.id.txtAnim);
Animation scale=
btnTranslate=findViewById(R.id.btnTranslate); AnimationUtils.loadAnimation(getApplicationC
btnRotate=findViewById(R.id.btnRotate); ontext(),R.anim.scale);
txtAnim.startAnimation(scale); android:layout_width="393dp"
} android:layout_height="247dp"
}); android:layout_marginStart="8dp"
btnAlpha.setOnClickListener(new android:layout_marginTop="16dp"
View.OnClickListener() {
android:background="#FFEA00"
@Override
android:text="HELLO TYBSCIT"
public void onClick(View v) {
android:textAlignment="center"
Animation
android:textColor="#F50057"
alpha=AnimationUtils.loadAnimation(getApplic
ationContext(),R.anim.alpha); android:textSize="60sp"
txtAnim.startAnimation(alpha);
app:layout_constraintStart_toStartOf="parent"
}
app:layout_constraintTop_toTopOf="parent" />
});
<Button
}
android:id="@+id/btnTranslate"
}
android:layout_width="137dp"
activity_main.xml:
android:layout_height="70dp"
<?xml version="1.0" encoding="utf-8"?>
android:layout_marginStart="36dp"
<androidx.constraintlayout.widget.ConstraintLa
android:layout_marginTop="372dp"
yout
xmlns:android="http://schemas.android.com/ap android:text="Translate"
k/res/android"
xmlns:app="http://schemas.android.com/apk/res app:layout_constraintEnd_toStartOf="@+id/btn
-auto" Rotate"
xmlns:tools="http://schemas.android.com/tools" app:layout_constraintHorizontal_bias="0.0"
android:id="@+id/main" app:layout_constraintStart_toStartOf="parent"
android:layout_width="match_parent" app:layout_constraintTop_toTopOf="parent" />
android:layout_height="match_parent" <Button
tools:context=".MainActivity"> android:id="@+id/btnRotate"
<TextView android:layout_width="150dp"
android:id="@+id/txtAnim" android:layout_height="69dp"
android:layout_marginTop="372dp" app:layout_constraintStart_toStartOf="parent"
/>
android:text="Rotate"
</androidx.constraintlayout.widget.ConstraintL
app:layout_constraintEnd_toEndOf="parent"
ayout>
app:layout_constraintHorizontal_bias="0.869"
app:layout_constraintStart_toStartOf="parent" translate.xml:
app:layout_constraintTop_toTopOf="parent" /> <?xml version="1.0" encoding="utf-8"?>
<Button <set xmlns:android=
android:id="@+id/btnScale" "http://schemas.android.com/apk/res/android"

android:layout_width="140dp" android:interpolator="@android:anim/bounce_i
nterpolator" >
android:layout_height="65dp"
<translate android:fromXDelta="0dp"
android:layout_marginStart="40dp"
android:toXDelta="400dp"
android:layout_marginBottom="108dp"
android:duration="4000"
android:text="Scale"
android:repeatMode="reverse"/>

app:layout_constraintBottom_toBottomOf="par </set>
ent" rotate.xml:
app:layout_constraintEnd_toStartOf="@+id/btn <?xml version="1.0" encoding="utf-8"?>
Alpha"
app:layout_constraintHorizontal_bias="0.234" <set
xmlns:android="http://schemas.android.com/ap
app:layout_constraintStart_toStartOf="parent" k/res/android">
/>
<rotate android:fromDegrees="0"
<Button
android:toDegrees="3600"
android:id="@+id/btnAlpha"
android:duration="12000"
android:layout_width="136dp"
android:pivotX="0.9"
android:layout_height="55dp"
android:pivotY="0.5" />
android:layout_marginBottom="116dp"
</set>
android:text="Alpha"
scale.xml:

app:layout_constraintBottom_toBottomOf="par <?xml version="1.0" encoding="utf-8"?>


ent" <set
app:layout_constraintEnd_toEndOf="parent" xmlns:android="http://schemas.android.com/ap
app:layout_constraintHorizontal_bias="0.837" k/res/android">
<scale android:fromXScale="1"
android:toXScale="4"
android:fromYScale="1"
android:toYScale="4"
android:pivotX="0.5"
android:pivotY="0.5"
android:duration="4000"/>
</set>
alpha.xml:
<?xml version="1.0" encoding="utf-8"?>
<set
xmlns:android="http://schemas.android.com/ap
k/res/android">
<alpha android:fromAlpha="0"
android:toAlpha="1"
android:duration="4000"
android:repeatCount="infinite"/>
</set>

OUTPUT:
PRACTICAL 10:
\\

AIM: Implement Location based service to retrieve user's current location.


MainActivity.java: import java.util.Locale;
package com.example.locationapplication;
public class MainActivity extends
import android.Manifest; AppCompatActivity implements
LocationListener {
import android.annotation.SuppressLint;
private Button btn;
import android.content.Context;
private TextView tv;
import android.content.Intent;
private LocationManager locationManager;
import android.content.pm.PackageManager;
@Override
import android.location.Address;
protected void onCreate(Bundle
import android.location.Geocoder;
savedInstanceState) {
import android.location.Location;
super.onCreate(savedInstanceState);
import android.location.LocationListener;
EdgeToEdge.enable(this);
import android.location.LocationManager;
setContentView(R.layout.activity_main);
import android.provider.Settings;
btn = findViewById(R.id.btn);
import android.os.Bundle;
tv = findViewById(R.id.tv);
import android.view.View;
if
import android.widget.Button; (ContextCompat.checkSelfPermission(this,
Manifest.permission.ACCESS_FINE_LOCATI
import android.widget.TextView;
ON) !=
import android.widget.Toast; PackageManager.PERMISSION_GRANTED) {
import androidx.activity.EdgeToEdge; ActivityCompat.requestPermissions(this,
new
import androidx.annotation.NonNull; String[]{Manifest.permission.ACCESS_FINE_
import LOCATION}, 100);
androidx.appcompat.app.AppCompatActivity; }
import androidx.core.app.ActivityCompat; btn.setOnClickListener(new
import androidx.core.content.ContextCompat; View.OnClickListener() {

import java.io.IOException; @Override

import java.util.List; public void onClick(View v) {


getLocation(); Location lastKnownLocation =
locationManager.getLastKnownLocation(Locati
}
onManager.GPS_PROVIDER);
});
if (lastKnownLocation != null) {
}
updateLocationUI(lastKnownLocation);
@SuppressLint("MissingPermission")
}
private void getLocation() {
}
locationManager = (LocationManager)
@Override
getSystemService(Context.LOCATION_SERVI
CE); public void onLocationChanged(@NonNull
Location location) {
if (!locationManager.isProviderEnabled
(LocationManager.GPS_PROVIDER) && updateLocationUI(location);
! locationManager.isProviderEnabled }
(LocationManager.NETWORK_PROVIDER))
private void updateLocationUI(Location
{
location) {
Toast.makeText(this, "Enable GPS",
double latitude = location.getLatitude();
Toast.LENGTH_LONG).show();
double longitude =location.getLongitude();
startActivity(new
Intent(Settings.ACTION_LOCATION_SOURC tv.setText("Latitude: " + latitude +
E_SETTINGS)); "\nLongitude: " + longitude);
return; Geocoder geocoder = new Geocoder(this,
Locale.getDefault());
}
try {
if (locationManager.isProviderEnabled
(LocationManager.GPS_PROVIDER)) { List<Address> addresses =
geocoder.getFromLocation(latitude, longitude,
locationManager.requestLocationUpdates(Locat
1);
ionManager.GPS_PROVIDER, 5000, 5, this);
if (!addresses.isEmpty()) {
}
String address =
else if
addresses.get(0).getAddressLine(0);
(locationManager.isProviderEnabled(Location
Manager.NETWORK_PROVIDER)) { tv.setText("Location: \n" + address);
locationManager.requestLocationUpdates(Locat }
ionManager.NETWORK_PROVIDER, 5000, 5,
this); } catch (IOException e) {

} e.printStackTrace();
tv.append("\nUnable to get address"); }
} }
} AndroidManifest.xml:
@Override <?xml version="1.0" encoding="utf-8"?>
public void onRequestPermissionsResult(int <manifest
requestCode, @NonNull String[] permissions, xmlns:android="http://schemas.android.com/ap
@NonNull int[] grantResults) { k/res/android"
super.onRequestPermissionsResult(requestCode xmlns:tools="http://schemas.android.com/tools"
, permissions, grantResults); >
if (requestCode == 100) { <uses-permission
android:name="android.permission.INTERNET
if (grantResults.length > 0 &&
"/>
grantResults[0] ==
PackageManager.PERMISSION_GRANTED) { <uses-permission
android:name="android.permission.ACCESS_F
getLocation();
INE_LOCATION"/>
} else {
<uses-permission
Toast.makeText(this, "Permission android:name="android.permission.ACCESS_C
Denied", Toast.LENGTH_SHORT).show(); OARSE_LOCATION"/>

} <application

} android:allowBackup="true"
android:dataExtractionRules="@xml/data_extra
} ction_rules"
@Override android:fullBackupContent="@xml/backup_rul
es"
public void onProviderDisabled(@NonNull
String provider) { android:icon="@mipmap/ic_launcher"

Toast.makeText(this, "GPS Disabled. android:label="@string/app_name"


Please enable GPS.", android:roundIcon="@mipmap/ic_launcher_rou
Toast.LENGTH_LONG).show(); nd"

} android:supportsRtl="true"
android:theme="@style/Theme.LocationApplic
@Override ation"
public void onProviderEnabled(@NonNull tools:targetApi="31">
String provider) {
<activity
Toast.makeText(this, "GPS Enabled",
Toast.LENGTH_SHORT).show(); android:name=".MainActivity"
android:exported="true">
app:layout_constraintEnd_toEndOf="parent"
<intent-filter>
app:layout_constraintTop_toTopOf="parent" />
<action
android:name="android.intent.action.MAIN" /> <TextView
<category android:id="@+id/tv"
android:name="android.intent.category.LAUNC
android:layout_width="350dp"
HER" />
android:layout_height="138dp"
</intent-filter>
android:layout_marginStart="40dp"
</activity>
android:layout_marginTop="92dp"
</application>
android:text="Current Location"
</manifest>
android:textSize="24sp"
activity_main.xml:
app:layout_constraintStart_toStartOf="parent"
<?xml version="1.0" encoding="utf-8"?> app:layout_constraintTop_toBottomOf="@+id/i
v" />
<androidx.constraintlayout.widget.ConstraintLa
yout <Button
xmlns:android="http://schemas.android.com/ap
android:id="@+id/btn"
k/res/android"
android:layout_width="175dp"
xmlns:app="http://schemas.android.com/apk/res
-auto" android:layout_height="68dp"
xmlns:tools="http://schemas.android.com/tools" android:layout_marginStart="112dp"
android:id="@+id/main" android:layout_marginTop="120dp"
android:layout_width="match_parent" android:text="Get Location"
android:layout_height="match_parent" android:textSize="20sp"
tools:context=".MainActivity">
app:layout_constraintStart_toStartOf="parent"
<ImageView
android:id="@+id/iv"
app:layout_constraintTop_toBottomOf="@+id/t
android:layout_width="215dp" v" />
android:layout_height="153dp" </androidx.constraintlayout.widget.ConstraintL
ayout>
android:layout_marginTop="132dp"
android:layout_marginEnd="104dp"
android:src="@drawable/gps"
OUTPUT:
[

JOURNAL
ON
CYBER CRIME AND INTELLECTUAL PROPERTY RIGHTS
IN THE PROGRAMME
BACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
SUBMITTED BY
DARSHAN PARMAR
B.SC. (IT)

SEMESTER VI
UNDER THE GUIDANCE OF
DR. VISHESH SHRIVASTAVA
ACADEMIC YEAR
2024 – 2025
CERTIFICATE

This is to certify that Mr. DARSHAN PARMAR of THIRD year of


Bachelor of Science in Information Technology, Roll No.TDIT042A of
Semester VI (2024 - 2025) has successfully completed the Journal of the
subject CYBER CRIME AND INTELLECTUAL PROPERTY RIGHTS
as per the guidelines of KES’ Shroff College of Arts and Commerce,
Kandivali (W), Mumbai-400067.

Teacher In-charge Principal


Dr. Vishesh Shrivastava Dr. Lily Bhushan
INDEX

Sr. No. Case Study Date

1. Data breach incident and legal consequences for a social media


platform.

2. Patent infringement case study involving a technology


company.

3. Intellectual property theft case involving a software


development company.

4. Ransom-ware attack on a healthcare organization and its legal


aftermath.

5. Trademark infringement case involving a multinational IT


corporation.
CASE STUDY 1:
Data breach incident and legal consequences for a social media platform.

Title: Data breach incident and legal consequences for a social media platform.

1. Introduction [

1.1. Overview of the Case Study


This case study examines a significant data breach incident involving Facebook, a leading social media
platform. In April 2021, personal data of over 530 million Facebook users was publicly posted on an
online hacking forum. The exposed information included phone numbers, email addresses, and other
personal details, raising serious concerns about user privacy and data security. [1].

1.2. Relevance to IPR and Cyber Law


Intellectual Property Rights (IPR) and Cyber Law are critical in regulating online platforms and ensuring
data security. This case highlights violations of privacy laws, cybercrime statutes, and data protection
regulations, emphasizing the legal responsibilities of tech companies to safeguard user information. The
unauthorized access and potential misuse of user data also bring concerns regarding digital rights and
corporate governance.

1.3. Objectives of the Study


1. To understand the legal implications of data breaches under global cyber laws.
2. To analyze the ethical concerns associated with corporate data handling.
3. To explore legal remedies and preventive measures for future incidents.
4. To assess how data breaches impact user trust and corporate accountability.

2. Case Study Description

2.1. Background Information


In April 2021, personal data of over 530 million Facebook users from 106 countries was leaked online.
The data, which had been scraped in 2019 due to a vulnerability in Facebook's contact importer feature,
included phone numbers, Facebook IDs, full names, locations, birthdates, and email addresses. This
information was later found circulating on underground forums and the dark web, raising serious concerns
about identity theft and fraud. [1]
2.2. Key Facts of the Case
1. The breach was first reported by cybersecurity researchers who noticed a massive leak of user
data.
2. Personal data, including phone numbers, emails, and other personal details, was leaked on the dark
web.
3. The breach was linked to a failure in security patch updates and poor API management.
4. Facebook delayed notifying affected users and regulatory bodies, violating mandatory disclosure
laws.
5. Cybercriminals attempted to use the leaked data for phishing attacks and identity fraud.

2.3. Legal Issues Identified


1. Violation of data protection laws due to the failure to secure user information.
2. Delay in reporting the breach, breaching regulatory requirements such as GDPR and CCPA.
3. Potential class-action lawsuits by affected users for damages and privacy invasion.
4. Ethical concerns regarding corporate responsibility and transparency in data handling.
5. Possible criminal liability for negligence in cybersecurity management.

2.4. Applicable Laws & Sections


General Data Protection Regulation (GDPR - EU): Articles 5, 32, and 33 on data security and breach
notification.
California Consumer Privacy Act (CCPA - USA): Fines for mishandling consumer data and failure to
inform users.
Information Technology Act (India): Section 43A for negligence in securing sensitive data, leading to
financial penalties.
Computer Fraud and Abuse Act (CFAA - USA): Criminal charges for unauthorized access and
exploitation of a security vulnerability.
Digital Personal Data Protection Act (India - 2023): Mandates prompt reporting of breaches and strict
data security measures.

3. Analysis of the Case

3.1. Interpretation from a Legal Perspective


From a legal standpoint, Facebook failed to implement adequate security measures, violating multiple
data protection regulations. The delayed response further worsened the impact, leading to regulatory
scrutiny and lawsuits. Regulators viewed this as gross negligence, as the company had prior warnings
about vulnerabilities but failed to address them promptly.

3.2. Arguments from Both Parties


Prosecution: Argued that the company neglected cybersecurity measures, violating privacy rights and
regulatory requirements. They also emphasized the delayed breach disclosure, causing further harm to
users.
Defense: Claimed the breach was due to an unforeseen cyberattack and that immediate steps were taken
to mitigate the damage. The company also cited resource constraints and evolving cyber threats as
challenges.

3.3. Ethical Concerns Involved


1. Breach of user trust due to negligence in data protection.
2. Lack of transparency in notifying affected users, causing further harm.
3. Monetization of user data without proper security investment.
4. Ethical implications of corporate accountability in cybersecurity.

3.4. Similar Past Cases and Precedents


Facebook-Cambridge Analytica Scandal (2018): Misuse of user data led to a $5 billion fine by the FTC.
Yahoo Data Breach (2013-2014): Exposed 3 billion accounts, resulting in major legal consequences and
regulatory changes.
Twitter API Exploit (2020): Exposed phone numbers linked to accounts, leading to stricter security
policies.
Equifax Data Breach (2017): Resulted in a $700 million settlement due to failure in securing consumer
credit data.

4. Court’s Judgment / Possible Legal Remedies

4.1. Summary of Court’s Judgment


In May 2023, the Irish Data Protection Commission fined Meta (Facebook’s parent company) $1.3
billion—the largest GDPR fine ever—for transferring user personal data to the US and violating GDPR
regulations. [2]

4.2. Hypothetical Legal Remedies and Outcomes


If additional legal actions were taken, the possible remedies and outcomes could include:
Heavier Financial Penalties:
Apart from the $1.3 billion GDPR fine, Facebook could face more lawsuits from users whose data
was compromised. Class-action lawsuits in various countries could lead to additional settlements,
increasing financial liabilities.

Regulatory Reforms and Compliance Mandates:


Governments and regulatory bodies may impose stricter guidelines for data handling. Facebook could be
required to:
1. Implement stronger encryption and security measures.
2. Improve transparency in breach notifications.
3. Conduct regular cybersecurity audits under regulatory supervision.

Criminal Investigations and Individual Accountability:


Senior executives responsible for data security failures could face legal consequences. If negligence is
proven, authorities may push for personal accountability, including fines, suspensions, or even criminal
charges in extreme cases.

User Compensation and Identity Protection Support:


1. Facebook may be required to compensate affected users financially.
2. Free credit monitoring and identity theft protection services could be mandated to prevent further
harm.
Mandatory Data Localization and Compliance with Regional Laws:
Some governments may require Facebook to store user data locally to prevent breaches caused by cross-
border data transfers. This could align with new digital protection laws like the EU’s GDPR and India's
DPDP Act.

Increased Oversight by Cybersecurity Agencies:


The breach could lead to more government oversight of tech companies, with agencies like the FTC
(USA), ICO (UK), and DPC (EU) closely monitoring compliance.

5. Conclusion & Learning Outcomes

5.1. Key Takeaways


1. Companies handling user data must prioritize cybersecurity to prevent large-scale breaches.
2. Delays in reporting breaches can lead to severe legal and reputational consequences.
3. Governments worldwide are enforcing stricter regulations, ensuring companies follow robust data
protection measures.

5.2. Impact on Future Legal Decisions


The record-breaking GDPR fine against Facebook set a precedent for harsher penalties for companies
failing to protect user data.
This case reinforced the importance of regulatory compliance with GDPR, CCPA, and emerging data
protection laws globally.
Future cases may see increased individual accountability for executives responsible for security failures.
5.3. Lessons Learned Related to IPR and Cyber Law
Data privacy is a fundamental right, and companies must respect it by implementing stringent security
policies.
Intellectual Property and Cyber Laws are evolving to address new threats, ensuring digital platforms
remain accountable.
Users must be aware of their digital rights and take necessary precautions, such as enabling two-factor
authentication and limiting data sharing on online platforms.

6. References & Citations

1). "Facebook Data Breach Timeline" – Firewall Times (firewalltimes.com)


2). "Facebook Data Breach & GDPR Fine" – NordVPN (nordvpn.com)
3). "GDPR Enforcement and Fines" – European Commission (ec.europa.eu)
4). "Cyber security Breach Disclosure Laws" – Harvard Law Review
CASE STUDY 2:
Patent infringement case study involving a technology company.
Title: Patent infringement case study involving a technology company.

1. Introduction
1.1. Overview of the Case Study
This case study examines the patent infringement litigation between Apple Inc. and Samsung Electronics
Co., two global leaders in the technology industry. The legal battle, initiated in 2011, centered around
allegations that Samsung's smartphones and tablets infringed upon Apple's design and utility patents. The
dispute spanned multiple countries and resulted in significant financial penalties and injunctions.

1.2. Relevance to IPR and Cyber Law


The case underscores the critical role of Intellectual Property Rights (IPR) in protecting technological
innovations and designs. It highlights the complexities involved in enforcing patents across different
jurisdictions and the challenges posed by rapidly evolving technology markets. The litigation also
emphasizes the importance of cyber law in addressing disputes related to digital technologies and
software.

1.3. Objectives of the Study


1. To analyze the legal arguments presented by both Apple and Samsung concerning patent
infringement.
2. To understand the implications of the case on global patent enforcement and the technology
industry.
3. To explore the ethical considerations surrounding corporate competition and innovation.
4. To examine the impact of the case on future legal decisions related to IPR and cyber law.

2. Case Study Description


2.1. Background Information
In 2011, Apple filed a lawsuit against Samsung, alleging that Samsung's Galaxy smartphones and tablets
copied the design, user interface, and packaging of Apple's iPhone and iPad products. Apple claimed that
Samsung's products infringed on its design patents, utility patents, and trade dress. Samsung countered by
filing lawsuits in various jurisdictions, alleging that Apple had infringed upon its patents related to wireless
communications technologies.
2.2. Key Facts of the Case
Design Patents: Apple accused Samsung of infringing on its design patents, including the iPhone's
rectangular shape with rounded corners and the grid layout of icons on the screen.
Utility Patents: Apple alleged that Samsung violated utility patents related to features like the "bounce-
back" effect when scrolling beyond the edge of a page and the tap-to-zoom functionality.
Trade Dress: Apple claimed that Samsung's products mimicked the overall look and feel of Apple's
devices, potentially causing consumer confusion.
Counterclaims: Samsung asserted that Apple had infringed upon its patents concerning wireless
communication technologies and camera functionalities.

2.3. Legal Issues Identified


Patent Infringement: Determining whether Samsung's products unlawfully used Apple's patented
designs and technologies.
Validity of Patents: Assessing the legitimacy and enforceability of the patents in question.
Trade Dress Infringement: Evaluating if Samsung's product design led to consumer confusion regarding
the source of the products.
Jurisdictional Challenges: Managing lawsuits filed in multiple countries with varying patent laws and
enforcement mechanisms.

2.4. Applicable Laws & Sections


United States Patent Act: Governs patent law in the U.S., including infringement and remedies.
Lanham Act: Addresses trademark infringement and issues related to trade dress.
International Patent Laws: Various national laws and international agreements, such as the Agreement
on Trade-Related Aspects of Intellectual Property Rights (TRIPS), relevant to the case.

3. Analysis of the Case


3.1. Interpretation from a Legal Perspective
The case required courts to interpret the scope and validity of design and utility patents, as well as the
concept of trade dress. A key legal question was whether the specific design elements and functionalities
claimed by Apple were patentable and if Samsung's products infringed upon these patents. The courts also
had to consider the appropriate standards for determining infringement and the calculation of damages.

3.2. Arguments from Both Parties


Apple's Arguments:
Samsung's products closely resembled Apple's designs, leading to consumer confusion and diluting
Apple's brand identity.
Samsung deliberately copied Apple's patented technologies and designs to capitalize on Apple's market
success.
Samsung's Arguments:
Apple's patents were overly broad and should be invalidated.
Similarities between the products were due to functional requirements and industry standards, not copying.
Apple infringed upon Samsung's patents related to wireless technologies.

3.3. Ethical Concerns Involved


Innovation vs. Imitation: Balancing the protection of intellectual property with the promotion of
competition and innovation in the technology industry.
Patent Strategies: Use of patents as strategic tools to hinder competitors, potentially stifling innovation.
Consumer Impact: Potential limitations on consumer choice and increased prices resulting from
litigation and injunctions.
3.4. Similar Past Cases and Precedents
Apple vs. HTC (2010): Apple sued HTC for patent infringement related to smartphone technologies,
leading to settlements and licensing agreements.
Microsoft vs. Motorola (2010): Dispute over patent licensing for video compression technologies,
highlighting issues of fair, reasonable, and non-discriminatory (FRAND) terms.

4. Court’s Judgment / Possible Legal Remedies

4.1. Summary of Court’s Judgment


In August 2012, a U.S. jury found Samsung guilty of infringing on several of Apple's design and utility
patents and awarded Apple over $1 billion in damages. However, this amount was later reduced, and
subsequent appeals led to various adjustments in the awarded damages. In December 2016, the U.S.
Supreme Court ruled that damages for design patent infringement could be based on a component of the
device rather than the entire product, leading to further proceedings to determine the final damages.

4.2. Hypothetical Legal Remedies and Outcomes


If the case had taken a different course or additional legal measures were enforced, the possible outcomes
and remedies could include:
1. Increased Financial Penalties for Samsung
While Samsung was initially ordered to pay over $1 billion, the final damages were reduced through
appeals. However, stricter interpretations of patent infringement laws could have resulted in:
1. Higher compensation for Apple, reflecting the actual commercial impact of Samsung’s alleged
copying.
2. Additional punitive damages, especially if courts found intentional misconduct.
2. Stricter Enforcement of Injunctions
Although Apple sought bans on certain Samsung devices, not all injunctions were upheld. A different
legal stance could have led to:
1. Permanent bans on infringing Samsung products in key markets like the U.S. and EU.
2. Mandatory redesigns of Samsung’s smartphones to comply with patent laws.
3. Licensing Agreements Instead of Litigation
If both companies had opted for settlement rather than prolonged litigation, potential outcomes could have
included:
Cross-licensing agreements, allowing Apple and Samsung to use each other’s patents under negotiated
terms.
Royalties paid to Apple for each Samsung device sold that incorporated Apple’s patented technology.
4. Increased Regulatory Scrutiny on Patent Law and Fair Competition
This case set a precedent, but if regulatory bodies had taken a more proactive role, potential outcomes
might have included:
1. Revised patent laws to prevent broad and ambiguous patents from stifling innovation.
2. Global patent standardization efforts, ensuring uniform protection across jurisdictions.
3. More stringent oversight on big tech mergers and acquisitions to prevent monopolistic control over
key technologies.
5. Impact on the Smartphone Industry and Consumer Choice
Depending on the legal remedies enforced, the case could have led to:
Slower innovation if companies feared patent lawsuits over minor design similarities.
Higher smartphone prices due to increased costs of licensing and legal compliance.
Emerging competitors benefiting from stricter Apple-Samsung rivalry, leading to market diversification.

5. Conclusion & Learning Outcomes


5.1. Key Takeaways
1. Patent protection is crucial in technology sectors, but excessive litigation can slow down industry
progress.
2. Legal battles between tech giants impact consumers, influencing product availability and pricing.
3. Intellectual property laws must strike a balance between protecting innovation and encouraging
fair competition.
5.2. Impact on Future Legal Decisions
Redefined scope of design patent damages: The U.S. Supreme Court’s ruling changed how damages
are calculated in similar cases.
Stronger focus on FRAND (Fair, Reasonable, and Non-Discriminatory) licensing: Future patent
disputes now consider fair use of essential technologies.
Global patent litigation strategy changes: Tech firms are now more cautious about patent filings and
licensing agreements.

5.3. Lessons Learned Related to IPR and Cyber Law


1. Broad patents can lead to prolonged legal battles: Companies must ensure their patents are specific
and enforceable.
2. Cross-licensing can be a viable alternative to litigation: Resolving disputes through agreements
can prevent market disruptions.
3. Regulatory bodies play a key role in maintaining fair competition: Governments must ensure
patent laws support both innovation and consumer choice.
6. References & Citations

[1]. "Apple Inc. v. Samsung Electronics Co. – Case Summary" – Harvard Law Review.
[2]. "Patent Wars in the Tech Industry" – Journal of Intellectual Property Law.
[3]. "Impact of Apple v. Samsung on Future Patent Litigation" – Stanford Technology Law Review.
[4]. "Patent Law and Innovation: Lessons from Apple-Samsung Dispute" – European Commission Report.
CASE STUDY 3:
Intellectual property theft case involving a software development company.
Title: Intellectual property theft case involving a software development company.
1. Introduction
1.1. Overview of the Case Study
This case study examines the intellectual property (IP) theft lawsuit filed by Media Rights Technologies,
Inc. (MRT) against Microsoft Corporation. MRT, a California-based software development company
specializing in digital rights management and secure content delivery solutions, alleged that Microsoft
infringed upon its copyrighted technologies.
1.2. Relevance to IPR and Cyber Law
The case underscores the complexities of enforcing intellectual property rights (IPR) in the software
industry, highlighting challenges related to copyright infringement, protection of proprietary technologies,
and the legal frameworks governing such disputes.
1.3. Objectives of the Study
1. To analyze the legal arguments presented by both MRT and Microsoft concerning the alleged IP
theft.
2. To understand the implications of the case on software development companies and their IP
protection strategies.
3. To explore the ethical considerations surrounding corporate competition and innovation.
4. To examine the impact of the case on future legal decisions related to IPR and cyber law.
2. Case Study Description
2.1. Background Information
Media Rights Technologies, Inc. (MRT) is a software development company specializing in digital rights
management (DRM) and secure content delivery solutions. In January 2025, MRT and its founder, Hank
Risan, filed a lawsuit against Microsoft Corporation, alleging that Microsoft had infringed upon MRT's
copyrighted technologies.
2.2. Key Facts of the Case
Allegations: MRT accused Microsoft of unauthorized use of its DRM technologies in Microsoft's
software products.
Claims: The lawsuit asserted that Microsoft's actions constituted copyright infringement and
misappropriation of proprietary technologies.
Defendant's Position: Microsoft denied the allegations, asserting that its technologies were developed
independently without infringing upon MRT's intellectual property.
2.3. Legal Issues Identified
Copyright Infringement: Determining whether Microsoft's software unlawfully incorporated MRT's
copyrighted technologies.
Trade Secret Misappropriation: Assessing if Microsoft's actions involved the unauthorized use of
MRT's proprietary information.
Damages Assessment: Evaluating the extent of harm suffered by MRT due to the alleged infringement.

2.4. Applicable Laws & Sections


U.S. Copyright Act: Governs the protection of original works of authorship, including software.
Defend Trade Secrets Act (DTSA): Provides a federal cause of action for trade secret misappropriation.
California Uniform Trade Secrets Act (CUTSA): State law addressing the misappropriation of trade
secrets.

3. Analysis of the Case


3.1. Interpretation from a Legal Perspective
The case required the court to examine the originality and protectability of MRT's technologies under
copyright law. Additionally, the court needed to determine whether Microsoft's software products
incorporated these technologies without authorization, constituting infringement. The assessment of trade
secret misappropriation involved evaluating the confidentiality measures employed by MRT and any
evidence of Microsoft's unauthorized use of proprietary information.

3.2. Arguments from Both Parties


MRT's Arguments:
Microsoft's software products unlawfully incorporated MRT's DRM technologies, constituting copyright
infringement.
Microsoft had access to MRT's proprietary information and used it to develop competing technologies,
amounting to trade secret misappropriation.
Microsoft's Arguments:
The technologies in question were developed independently without reference to MRT's intellectual
property.
MRT's claims were unsubstantiated and lacked specific evidence of infringement or misappropriation.
3.3. Ethical Concerns Involved
Innovation vs. Imitation: Balancing the protection of intellectual property with the promotion of
competition and innovation in the software industry.
Corporate Responsibility: Ensuring that large corporations do not exploit smaller companies'
innovations without proper authorization or compensation.
Legal Resource Disparity: Addressing the challenges faced by smaller companies in enforcing their IP
rights against larger, resource-rich corporations.

3.4. Similar Past Cases and Precedents


ResMan v. Karya and Expedien: A property management software company sued a customer and a
software development firm for developing a competing platform using stolen proprietary information.

Teradata v. SAP: Teradata accused SAP of entering a joint venture to access its intellectual property and
create a competing database product, leading to allegations of trade secret theft and antitrust violations.

4. Court’s Judgment / Possible Legal Remedies


4.1. Summary of Court’s Judgment
As of the latest available information, the lawsuit filed by MRT against Microsoft is ongoing, and a final
judgment has not yet been rendered. The court proceedings are expected to address the validity of MRT's
claims, the evidence presented by both parties, and any potential damages or injunctive relief.

4.2. Hypothetical Legal Remedies and Outcomes


Depending on the court's findings, potential legal remedies could include:
Injunction: A court order preventing Microsoft from using the disputed technologies in its products.
Monetary Damages: Compensation to MRT for any financial losses resulting from the alleged
infringement.
Licensing Agreements: Mandatory licensing arrangements allowing Microsoft to use MRT's
technologies under agreed terms.
Settlement: A negotiated agreement between MRT and Microsoft to resolve the dispute outside of court,
potentially involving financial compensation and future collaboration terms.
5. Conclusion & Learning Outcomes
5.1. Key Takeaways
Vigilant IP Protection: The case underscores the importance for software companies to proactively
safeguard their intellectual property through timely registrations and robust legal strategies.
Comprehensive Legal Strategy: Employing a multifaceted legal approach, including claims of copyright
infringement, trade secret misappropriation, and breach of contract, can enhance the enforcement of IP
rights.
Significance of Claim Preclusion: The doctrine of claim preclusion can bar subsequent lawsuits arising
from the same set of facts, emphasizing the need for plaintiffs to consolidate all related claims in a single
action.
5.2. Impact on Future Legal Decisions
Clarification of Claim Preclusion Scope: The case contributes to the jurisprudence on claim preclusion,
particularly concerning the necessity of bringing all related claims in the initial lawsuit to avoid dismissal
in subsequent actions.
Guidance on IP Enforcement: The outcomes provide insights into effectively structuring IP enforcement
strategies, especially regarding the timing and combination of different legal claims.
5.3. Lessons Learned Related to IPR and Cyber Law
Strategic Litigation Planning: IP holders must carefully plan their litigation strategies to include all
possible claims in the initial suit to prevent future claim preclusion issues.
Awareness of Legal Doctrines: Understanding doctrines like claim preclusion is crucial for IP
enforcement, as they can significantly impact the success of legal actions.
Evolving Legal Landscape: The case highlights the dynamic nature of IP law and the necessity for
continuous adaptation to new legal precedents and interpretations.
6. References & Citations
[1]. "Media Rights Technologies, Inc. v. Microsoft Corp." – Justia Law.
[2]. "Media Rights Technologies Sues Microsoft for Alleged Intellectual Property Theft" – PR Newswire.
[3]. "Media Rights Technologies, Inc. v. Microsoft Corp." – Casetext.
[4]. "Media Rights Technologies, Inc. v. Microsoft Corp." – Stanford Copyright and Fair Use Center.
CASE STUDY 4:
Ransom-ware attack on a healthcare organization and its legal aftermath.
Title: Ransom-ware attack on a healthcare organization and its legal aftermath.
1. Introduction
1.1. Overview of the Case Study
In February 2024, Change Healthcare, a prominent medical billing company, experienced a ransomware
attack executed by the ALPHV/BlackCat ransomware group. This incident compromised the personal
data of over 100 million patients and disrupted healthcare services nationwide.

1.2. Relevance to IPR and Cyber Law


This case underscores the critical importance of cybersecurity in protecting sensitive healthcare
information. It highlights the legal obligations of healthcare organizations under data protection laws and
the potential ramifications of failing to safeguard intellectual property and personal data.

1.3. Objectives of the Study


1. Analyze the specifics of the ransomware attack on Change Healthcare.
2. Identify the legal and ethical issues arising from the incident.
3. Discuss the applicable laws and regulations related to data protection and cybersecurity.
4. Explore the potential legal remedies and outcomes.
5. Derive lessons learned to enhance cybersecurity measures in the healthcare sector.

2. Case Study Description


2.1. Background Information
Change Healthcare is a leading healthcare technology company providing data and analytics-driven
solutions to improve clinical, financial, and patient engagement outcomes. Serving a vast network of
healthcare providers, the company handles extensive amounts of sensitive patient information.

2.2. Key Facts of the Case


Date of Attack: February 2024.
Perpetrators: ALPHV/BlackCat ransomware group.
Data Compromised: Personal information of over 100 million patients.
Operational Impact: Significant disruptions in healthcare services due to compromised billing and data
systems.
Ransom Demand: $22 million, which was eventually paid by Change Healthcare.
2.3. Legal Issues Identified
Data Breach Notification: Obligations under data protection laws to promptly inform affected
individuals and authorities
Compliance Failures: Potential non-compliance with healthcare data protection regulations
Liability for Damages: Legal responsibility for harm caused to patients due to compromised personal
data.
2.4. Applicable Laws & Sections
Health Insurance Portability and Accountability Act (HIPAA): U.S. federal law governing the
protection of health information
State Data Breach Notification Laws: Various state-specific regulations requiring timely notification of
data breaches
Federal Trade Commission (FTC) Act: Prohibits unfair or deceptive practices affecting commerce,
including inadequate data security measures
3. Analysis of the Case
3.1. Interpretation from a Legal Perspective
The ransomware attack on Change Healthcare represents a severe breach of data protection obligations
under HIPAA and other relevant laws. The failure to protect sensitive patient information exposes the
company to regulatory penalties, potential lawsuits from affected individuals, and reputational harm.
3.2. Arguments from Both Parties
Change Healthcare: The company may argue that it was a victim of a sophisticated cyberattack and that
it took appropriate measures to mitigate the impact, including paying the ransom to prevent further harm
to patients.
Affected Patients: Patients could contend that Change Healthcare failed to implement adequate
cybersecurity measures, resulting in the unauthorized access and potential misuse of their personal
information.
3.3. Ethical Concerns Involved
Patient Trust: The breach undermines trust in the healthcare system's ability to protect sensitive
information.
Ransom Payment: Paying the ransom may be seen as ethically problematic, as it could encourage further
criminal activity.
Data Misuse: The potential for compromised data to be used maliciously poses ethical dilemmas
regarding patient privacy and safety.
3.4. Similar Past Cases and Precedents
UVM Health Network Ransomware Attack (2020): A cyberattack that disrupted services across a six-
hospital network, highlighting vulnerabilities in healthcare cybersecurity.
CommonSpirit Health Ransomware Attack (2042): A ransomware incident affecting multiple facilities
within a large non-profit healthcare system, leading to significant operational challenges.

4. Court’s Judgment / Possible Legal Remedies


4.1. Summary of Court’s Judgment
As of now, there is no public record of a court judgment related to this specific case. However, regulatory
investigations and potential civil lawsuits are plausible outcomes.

4.2. Hypothetical Legal Remedies and Outcomes


Regulatory Fines: Imposition of fines for non-compliance with data protection laws.
Civil Litigation: Class-action lawsuits by affected patients seeking damages for the breach of their
personal information.
Mandatory Corrective Actions: Requirements to implement enhanced cybersecurity measures and
undergo regular audits.

5. Conclusion & Learning Outcomes


5.1. Key Takeaways
Criticality of Cybersecurity: The healthcare sector must prioritize robust cybersecurity measures to
protect sensitive patient data.
Legal Obligations: Healthcare organizations are legally required to implement adequate data protection
strategies and promptly address breaches.
Proactive Measures: Regular risk assessments, employee training, and incident response planning are
essential to mitigate cyber threats.
[

5.3. Lessons Learned Related to IPR and Cyber Law


Strengthening Cybersecurity Measures:
Organizations, particularly in healthcare, must adopt proactive cybersecurity frameworks to safeguard
intellectual property and sensitive patient data.
Implementing multi-layered security protocols, such as advanced encryption, endpoint detection, and
network segmentation, can help prevent ransomware attacks.
Compliance with Data Protection Regulations:
Adhering to legal frameworks like HIPAA, GDPR, and State Data Breach Notification Laws is crucial to
avoid regulatory fines and legal repercussions.
Regular audits and risk assessments should be mandated for companies handling sensitive data.

Ethical Responsibility in Data Protection:


Organizations must maintain transparency with stakeholders about data breaches and ensure affected
individuals are informed promptly.
The ethical dilemma of paying ransoms should be evaluated, balancing operational continuity against the
long-term risk of funding cybercriminals.

Legal Liabilities and Corporate Accountability:


The case highlights the strict liability imposed on organizations failing to ensure data security.
Courts may impose heavy penalties on organizations if negligence in cybersecurity measures is proven.

Need for a Rapid Incident Response Plan:


Businesses should develop and regularly test cyber incident response plans to mitigate damages caused
by ransomware attacks.
Collaboration with law enforcement agencies, cybersecurity experts, and legal teams should be an integral
part of response mechanisms.
6. References & Citations
[1]. Wired.com. (2024). The Worst Hacks of 2024 So Far.
[2]. HealthTechZone. (2023). Case Study: How Did Ransomware Attacks Affect These Healthcare
Organizations?
[3]. Insurica. (2020). UVM Health Network Ransomware Attack: Lessons for Healthcare Security.
[4]. HIPAA Journal. (2024). HIPAA Compliance and Data Breach Regulations: Legal Obligations for
Healthcare Organizations.
[5]. U.S. Department of Health & Human Services. (2023). Cybersecurity and Healthcare: Protecting
Patient Information from Ransomware Attacks.
CASE STUDY 5:
Trademark infringement case involving a multinational IT corporation.
Title: Trademark infringement case involving a multinational IT corporation.

1. Introduction
1.1. Overview of the Case Study
In 2011, Apple Inc. initiated a series of legal actions against Samsung Electronics Co., alleging
infringement of multiple patents, trademarks, and trade dress related to Apple's iPhone and iPad designs.
This high-profile legal battle spanned several years and jurisdictions, highlighting critical issues in
intellectual property rights within the technology sector.

1.2. Relevance to IPR and Cyber Law


This case underscores the complexities of protecting intellectual property in the rapidly evolving tech
industry, emphasizing the importance of patents, trademarks, and design rights in maintaining competitive
advantage and fostering innovation.

1.3. Objectives of the Study


1. Examine the specifics of the Apple vs. Samsung legal disputes.
2. Identify the legal challenges and implications arising from the alleged infringements.
3. Discuss the ethical considerations and precedents set by these cases.
4. Extract lessons learned to enhance intellectual property protection strategies in the technology
industry.

2. Case Study Description


2.1. Background Information
Apple Inc., headquartered in Cupertino, California, is renowned for its innovative consumer electronics,
including the iPhone and iPad. Samsung Electronics Co., based in South Korea, is a leading manufacturer
of electronic devices and a major competitor in the smartphone market. The legal disputes between these
two giants began in 2011 when Apple accused Samsung of copying the design and functionality of its
products.
2.2. Key Facts of the Case
Initial Lawsuit: In April 2011, Apple filed a lawsuit against Samsung in the United States, alleging that
Samsung's smartphones and tablets infringed on Apple's patents and trademarks.
Counterclaims: Samsung responded with countersuits, alleging that Apple had infringed on its patents.
Global Litigation: The dispute expanded globally, with lawsuits filed in multiple countries, including
Germany, South Korea, Japan, and Australia.
Jury Verdict: In August 2012, a U.S. jury awarded Apple over $1 billion in damages, finding that
Samsung had infringed on several Apple patents and diluted its trade dress.
Appeals and Supreme Court Involvement: The case saw numerous appeals, culminating in a U.S.
Supreme Court decision in 2016, which addressed the issue of design patent damages.

2.3. Legal Issues Identified


Patent Infringement: Allegations that Samsung's products violated Apple's utility and design patents.
Trademark Infringement and Trade Dress Dilution: Claims that Samsung's product designs and user
interfaces were confusingly similar to Apple's, potentially misleading consumers.
Damages Calculation: Determining the appropriate method for calculating damages for design patent
infringement, particularly whether damages should be based on the entire product or just a component.

2.4. Applicable Laws & Sections


U.S. Patent Law (35 U.S.C. § 101 et seq.): Governs the protection of inventions and patents.
Lanham Act (15 U.S.C. § 1051 et seq.): Addresses trademark infringement and trade dress protection.
35 U.S.C. § 289: Specifically pertains to damages for design patent infringement.

3. Analysis of the Case


3.1. Interpretation from a Legal Perspective
The case highlighted the challenges in applying existing intellectual property laws to complex, multi-
component technological products. A significant legal question was how to calculate damages for design
patent infringement—whether to base it on the entire product's profits or only the infringing components.

3.2. Arguments from Both Parties


Apple: Argued that Samsung's products closely mimicked the design and functionality of Apple's devices,
infringing on its patents and trademarks, and sought damages based on the total profits from the infringing
products.

Samsung: Contended that the patents in question were invalid, denied infringement, and argued that
damages should be limited to the specific components that infringed, not the entire product.

3.3. Ethical Concerns Involved


Innovation vs. Imitation: The ethical debate over drawing the line between legitimate competition and
unethical copying of a competitor's designs and technology.
Consumer Confusion: Concerns about consumers being misled by products that closely resemble those
of another company, potentially affecting purchasing decisions.
3.4. Similar Past Cases and Precedents
Sony Corp. v. Connectix Corp. (2000): Addressed issues of software emulation and copyright
infringement in the technology sector.
Microsoft Corp. v. Motorola, Inc. (2012): Involved patent infringement and the calculation of
reasonable royalties for standard-essential patents.

4. Court’s Judgment / Possible Legal Remedies


4.1. Summary of Court’s Judgment
In 2012, a U.S. jury awarded Apple $1.05 billion in damages, finding that Samsung had infringed on
several of Apple's patents and diluted its trade dress. However, this amount was later reduced, and after
multiple appeals, the U.S. Supreme Court in 2016 addressed the method of calculating design patent
damages, ruling that damages could be based on a component of the product rather than the entire product.
The case was remanded for further proceedings consistent with this interpretation.

4.2. Hypothetical Legal Remedies and Outcomes


Injunctions: Courts could issue injunctions preventing the sale of infringing products.
Monetary Damages: Awarding damages based on the profits attributable to the infringing components.
Settlements: The parties could reach a settlement agreement to avoid prolonged litigation.

5. Conclusion & Learning Outcomes


5.1. Key Takeaways
Complexity of IP Protection: The Apple vs. Samsung case illustrates the challenges in enforcing
intellectual property rights, especially in industries with rapid technological advancements.
Design vs. Functionality: The case reinforced the importance of distinguishing between design patents
and utility patents, affecting how companies protect their innovations.
Significance of Precedents: The U.S. Supreme Court's ruling on design patent damages set a critical
precedent, impacting future cases involving similar disputes.
Consumer Impact: Trademark and trade dress infringement cases highlight how legal conflicts influence
consumer choice and market competition.

5.2. Impact on Future Legal Decisions


Changes in Patent Damage Calculations: The ruling clarified that damages should not always be based
on the total product revenue but could focus on specific infringing components.
Stronger IP Enforcement by Tech Companies: The case encouraged companies to be more proactive
in patenting their designs and filing lawsuits to protect their innovations.
Influence on Global IP Laws: Courts in multiple jurisdictions, including Europe and Asia, considered
the case's legal interpretations when handling similar disputes in their respective regions.

5.3. Lessons Learned Related to IPR and Cyber Law


Comprehensive Patent Strategy: Companies need to ensure their intellectual property protection
strategies cover both utility and design patents to prevent infringement disputes.
Global Legal Landscape Awareness: Multinational corporations must understand how different
countries interpret and enforce intellectual property laws to navigate potential legal risks.
Consumer Confusion and Ethical Considerations: Businesses must strike a balance between drawing
inspiration from competitors and outright imitation to avoid misleading consumers and violating
trademark laws.

6. References & Citations


[1]. Apple Inc. v. Samsung Electronics Co., 137 S. Ct. 429 (2016)
[2]. U.S. Patent Law (35 U.S.C. § 101 et seq.)
[3]. “The Apple-Samsung Patent War and Its Global Implications” – Harvard Law Review
[4]. “Design Patents and Their Role in Protecting Innovation” – Stanford Technology Law Journal

You might also like