This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.*; | |
| class AtulQueueOverflow extends Exception { | |
| public String toString() { | |
| return "Queue overflow"; | |
| } | |
| } | |
| class AtulQueueUnderflow extends Exception { | |
| public String toString() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| import java.util.Scanner; | |
| class StacksDSPD { | |
| public int value; | |
| private int top = -1; | |
| private int MAXSIZE; | |
| char stack[]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| import java.util.Scanner; | |
| interface stackMethods{ | |
| void pick(); | |
| boolean isEmpty(); | |
| boolean isFull(); | |
| void push(char data); | |
| char pop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| import java.util.Scanner; | |
| class StacksDSPD { | |
| private int top = -1; | |
| private int MAXSIZE; | |
| char stack[]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| import java.util.Scanner; | |
| interface stackMethods{ | |
| void pick(); | |
| boolean isEmpty(); | |
| boolean isFull(); | |
| void push(char data); | |
| char pop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| import java.util.Scanner; | |
| public class StringReverseUsingStacks { | |
| public static void main(String[] args) { | |
| Scanner atul=new Scanner(System.in); | |
| System.out.println("Enter Something in string"); | |
| String something=atul.nextLine(); | |
| stackMethodsImplementation reversing=new stackMethodsImplementation(something.length()); | |
| for(int i=0;i<something.length();i++){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| import java.util.Scanner; | |
| interface stackMethods{ | |
| void pick(); | |
| boolean isEmpty(); | |
| boolean isFull(); | |
| void push(char data); | |
| char pop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| //Library Program | |
| class MyLibrary{ | |
| private String []books; | |
| private String []issuedBook; | |
| private int noOfBook,noOfIssuedBook; | |
| public MyLibrary(){ | |
| this.books=new String[100]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| interface TvRemote{ | |
| void changeChannel(String ChannelNumber); | |
| void decreaseVolume(); | |
| void increaseVolume(); | |
| } | |
| interface SmartTvRemote extends TvRemote{ | |
| void playMusic(); | |
| void youtube(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.Atul; | |
| abstract class Telephone{ | |
| abstract public void ring(); | |
| abstract public void lift(); | |
| abstract public void disconnect(); | |
| } | |
| class SmartTelephone extends Telephone{ | |
| @Override | |
| public void ring(){ |
NewerOlder