Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Loop project/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-13">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
17 changes: 17 additions & 0 deletions Loop project/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>Loop</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
14 changes: 14 additions & 0 deletions Loop project/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=13
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=13
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=13
Binary file not shown.
Binary file added Loop project/bin/client/Main.class
Binary file not shown.
Binary file added Loop project/bin/client/package-info.class
Binary file not shown.
Binary file added Loop project/bin/defination/EnggCollege.class
Binary file not shown.
Binary file added Loop project/bin/defination/EnggObj.class
Binary file not shown.
Binary file added Loop project/bin/defination/LinkedList$Node.class
Binary file not shown.
Binary file added Loop project/bin/defination/LinkedList.class
Binary file not shown.
Binary file added Loop project/bin/defination/MedCollege.class
Binary file not shown.
Binary file added Loop project/bin/defination/MedObj.class
Binary file not shown.
Binary file added Loop project/bin/defination/package-info.class
Binary file not shown.
43 changes: 43 additions & 0 deletions Loop project/src/client/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package client;
import defination.MedObj;
import defination.EnggObj;
import java.util.Scanner;

public class Main {

public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int choice = 0;
MedObj M = new MedObj();
M.startPushing();
EnggObj E= new EnggObj();
E.startPushing();
do {
System.out.print("\n\t1.Medical - NEET\n\t2.Engineering - CET\n\t0.Exit\nEnter your choice : ");
choice = sc.nextInt();
switch(choice) {
case 1 : System.out.println("Enter your ALL INDIA RANK of NEET : ");
int myrank= sc.nextInt();
System.out.print("Enter your category : ");
String cat = sc.next();
String catgy = cat.toUpperCase();
M.searching_med(myrank,catgy);
break;
case 2 : System.out.println("Enter your CET Rank : ");
myrank = sc.nextInt();
System.out.println("Enter your category : ");
String cate=sc.next();
System.out.println("Enter desired branch : ");
String br=sc.next();
String categry=cate.toUpperCase();
String branch = br.toUpperCase();
E.searching_engg(myrank, categry,branch);
break;
case 0 : System.out.println("\nExiting, Thank You!");
break;
default :System.out.println("\nInvalid Input");
}
}while(choice != 0);
sc.close();
}
}
1 change: 1 addition & 0 deletions Loop project/src/client/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package client;
34 changes: 34 additions & 0 deletions Loop project/src/defination/EnggCollege.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package defination;

public class EnggCollege {
private String college_name;
private int cutoff_rank_engg;
private String category;
private String branch;
//getters
public String getCollege_name() {
return college_name;
}
public int getCutoff_rank_engg() {
return cutoff_rank_engg;
}
public String getCategory() {
return category;
}
public String getBranch() {
return branch;
}
//constructor
public EnggCollege(String college_name, String branch, int cutoff_rank_engg, String category) {
this.college_name = college_name;
this.branch = branch;
this.cutoff_rank_engg = cutoff_rank_engg;
this.category = category;

}





}
1,915 changes: 1,915 additions & 0 deletions Loop project/src/defination/EnggObj.java

Large diffs are not rendered by default.

101 changes: 101 additions & 0 deletions Loop project/src/defination/LinkedList.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
package defination;

import java.util.ArrayList;


public class LinkedList {
//Represent a node of the singly linked list
class Node{
MedCollege data;
EnggCollege dat;
Node next;

public Node(MedCollege data) {
this.data = data;
this.next = null;
}
public Node(EnggCollege dat) {
this.dat= dat;
this.next = null;
}
}

public Node head = null;
public Node tail = null;

//addNode() will add a new node to the list
public void addNode(MedCollege data) {
Node newNode = new Node(data); //Create a new node

//Checks if the list is empty
if(head == null) {
head = newNode;
tail = newNode;
}
else {
tail.next = newNode;
tail = newNode;
}
}

public void addNode(EnggCollege data) {
Node newNode = new Node(data);//create new node
if(head == null) {
head = newNode;
tail = newNode;
}
else {
tail.next = newNode;
tail = newNode;
}
}

//medical search function
public void search(int myrank) {
ArrayList<String> myclg = new ArrayList<String>();
Node current = head;
while(current != null) {
if(myrank <= current.data.getCutoff_rank())
{
myclg.add(current.data.getName());
}
current = current.next;
}
if(myclg.isEmpty()) {
System.out.println("Couldn't match a Gov MBBS college with your AIR and category");

}
else {
System.out.println("Applicable clgs are :");
for(int i=0;i < myclg.size();i++) {
System.out.println( i+1 +" "+ myclg.get(i));
}
}
}

//Engg searching function
public void search(int myrank,String branch) {
ArrayList<String> myclg = new ArrayList<String>();
Node current = head;
while(current != null) {
if(current.dat.getBranch().equals(branch)) {
if(myrank <= current.dat.getCutoff_rank_engg())
{
myclg.add(current.dat.getCollege_name());
}
}
current = current.next;
}
if(myclg.isEmpty()) {
System.out.println("Couldn't match a college with your rank,category with desired branch");

}
else {
System.out.println("Applicable clgs are :");
for(int i=0;i < myclg.size();i++) {
System.out.println( i+1 +" "+myclg.get(i));
}
}
}
}

27 changes: 27 additions & 0 deletions Loop project/src/defination/MedCollege.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package defination;

public class MedCollege {
private String name;
private int cutoff_rank;
private String category;

//getters
public String getName() {
return name;
}
public int getCutoff_rank() {
return cutoff_rank;
}
public String getCategory() {
return category;
}

//Constructor
public MedCollege(String name, int cutoff_rank, String category) {
this.name = name;
this.cutoff_rank = cutoff_rank;
this.category = category;
}


}
Loading