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

Knapsack

Uploaded by

mishraayush2812
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)
3 views

Knapsack

Uploaded by

mishraayush2812
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/ 18

SCHOOL OF ENGINEERING AND TECHNOLOGY

Record of Applied and Action Learning


(Programming Practice)

Subject Name:

Subject Code:

Semester:

Name:

Registration No.:

Program/Branch:

Specialization:

Academic Year:

Campus:
CENTURION UNIVERSITY OF TECHNOLOGY AND MANAGEMENT
ODISHA

Certificate
This is to certify that Mr./Ms .............................................................................. having

Registration No. ............................................... of ........................................... Semester,

.................................................................... Program, ..........................................................

School, .................................................. Campus has completed ...................................

number of experiments in ............................................ Applied and Action

Learning Laboratory and fulfils the.......................................................... course

requirements.

Signature of the HoD/Dean Signature of the Faculty

Of𝑓ice Seal
INDEX
Sl. Page Faculty
Date Name of the Experiment Remark
No. No. Signature
School: ............................................................................................................. Campus: .......................................................

Academic Year: ...................... Subject Name: ........................................................... Subject Code: ..........................

Semester: ............... Program: ........................................ Branch: ......................... Specialization: ..........................

Date: .....................................

(Learning by Doing and Discovery)

* Coding Phase: Pseudo Code / Flow Chart / Algorithm

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
Applied and Action Learning

* Coding Phase: Pseudo Code / Flow Chart / Algorithm

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Coding Phase: Pseudo Code / Flow Chart / Algorithm

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Testing Phase: Compilation of Code (error detection)

Applied and Action Learning

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Implementation Phase: Final Output (no error)

import java.lang.*;
import java.util.Arrays;
import java.util.Comparator;

public class knapsack {


private static double getMaxValue(ItemValue[] arr,int capacity)
{
Arrays.sort(arr, new Comparator<ItemValue>() {
public int compare(ItemValue item1,ItemValue item2)
{
double cpr1 = (double) item1.profit / (double) item1.weight;
double cpr2 = (double) item2.profit / (double) item2.weight;

if (cpr1 < cpr2)


return 1;
else
return -1;
}
});

double totalValue = 0d;

for (ItemValue i : arr) {


int curWt = (int)i.weight;
int curVal = (int)i.profit;
if (capacity - curWt >= 0) {
capacity = capacity - curWt;
totalValue += curVal;
}
else {
double fraction = ((double)capacity / (double)curWt);
totalValue += (curVal * fraction);
capacity= (int)(capacity - (curWt * fraction));
break;
}
}

return totalValue;
}
static class ItemValue {

int profit, weight;


public ItemValue(int val, int wt)
{
this.weight = wt;
this.profit = val;
}
}

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Implementation Phase: Final Output (no error)

public static void main(String[] args)


{

ItemValue[] arr = { new ItemValue(60, 10),new ItemValue(100, 20),new


ItemValue(120, 30) };
int capacity = 50;
double maxValue = getMaxValue(arr, capacity);
System.out.println(maxValue);
}
}

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Implementation Phase: Final Output (no error)

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Implementation Phase: Final Output (no error)

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Implementation Phase: Final Output (no error)

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Implementation Phase: Final Output (no error)

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
* Implementation Phase: Final Output (no error)

*As applicable according to the experiment.


Two sheets per experiment (10-20) to be used.
Applied and Action Learning

* Implementation Phase: Final Output (no error)

Rubrics
Concept 10
Planning and Execution/ 10
Practical Simulation/ Programming
Result and Interpretation 10
Record of Applied and Action Learning 10
Viva 10
Total 50

Signature of the Student:

Signature of the Faculty:


*As applicable according to the experiment.
Two sheets per experiment (10-20) to be used.
Applied and Action Learning
ASSESSMENT

Experiment Full Mark Marks Obtained Experiment Full Mark Marks Obtained

Experiment - 1 50 Experiment - 12 50
Experiment - 2 50 Experiment - 13 50
Experiment - 3 50 Experiment - 14 50
Experiment - 4 50 Experiment - 15 50
Experiment - 5 50 Experiment - 16 50
Experiment - 6 50 Experiment - 17 50
Experiment - 7 50 Experiment - 18 50
Experiment - 8 50 Experiment - 19 50
Experiment - 9 50 Experiment - 20 50
Experiment - 10 50 Average
50
Experiment - 11 50 Total

Date: Signature of the Faculty

* LEARNING OUTCOMES:
How the Applied and Action Learning encourages Critical Thinking, Problem
Solving, Idea Generation and Skill Development etc.?

How the Applied and Action Learning encourages Leadership, Team Work,
Reflection and Decision Making Capability etc.?

Date: Signature of the Student

*One sheet per learning record to be used


Applied and Action Learning
COURSE OUTCOMES (COs) ATTAINMENT
➢ Expected Course Outcomes (COs):
(Refer to COs Statement in the Syllabus)

➢ Course Outcomes (COs) Attained:


How would you rate your learning of the subject based on the specified COs?

1 2 3 4 5 6 7 8 9 10
LOW HIGH

➢ Learning Gap (If any):

➢ Books/Manuals Referred:

Date: Signature of the Student


➢ Suggestions / Recommendations:
(by the Course Faculty)

Date: Signature of the Faculty

*One sheet per learning record to be used


CENTURION UNIVERSITY OF TECHNOLOGY AND MANAGEMENT, ODISHA

CAMPUSES:
Paralakhemundi Campus Bhubaneswar Campus Balangir Campus Rayagada Campus Balasore Campus Chatrapur Campus
Village Alluri Nagar Ramchandrapur Behind BSNL Office IDCO Industrial Area Gopalpur, Ramchandrapur,
P.O. – R Sitapur, Via- Uppalada P.O. – Jatni, Bhubaneswar IDCO land, Rajib Nagar Pitamahal, Rayagada P.O.-Balasore Kaliabali Chhak,
Paralakhemundi, Dist.- Gajapati Dist.- Khurda, Odisha, Dist.- Balangir, Odisha Dist.-Rayagada, Odisha Dist.-Balasore, Odisha P.O-Chatrapur, Dist.-Ganjam
Odisha, India. PIN– 761211 India, PIN– 752050 India, PIN-767001 India, PIN-765001 India, PIN-756044 Odisha, India, PIN-761020

You might also like