Skip to content

👋 I'm Muskan Patel, an SDET/QA and Java developer with expertise in automated testing (Cypress, POM) and core Java concepts. Passionate about building robust, maintainable tests for e-commerce applications and implementing object-oriented design principles. Constantly learning and adapting to improve software quality!

Notifications You must be signed in to change notification settings

Muskan19-web/Automation-on-E-Commerce-Applicationlication

Repository files navigation

cypressConstructweek2

2 #Java Construct Week: Java Programs for Stack Operations and String Manipulation Project Overview This project contains Java implementations of two primary tasks:

  1. Removing vowels from a given string.
  2. Implementing a stack using an array. File Structure: Construct_Week/ │ ├── ArrayStack.java # Implementation of Stack using Array ├── Operations_on_Stack.java # Main ϐile to demonstrate Stack operations └── RemoveVowels.java # Program to remove vowels from a given string Task Details Question 1: Remove Vowels from a String Objective: Write a Java program that removes all vowels from a given string. Files Involved:
  • RemoveVowels.java Functionality:
  • The program prompts the user to enter a string.
  • The vowels are removed from the string using a custom method.
  • The modified string is displayed with all vowels removed. Sample Input and Output: Input: Enter a string: hello, world! Output: The string with vowels removed is: hll, wrld! Question 2: Implement a Stack using an Array Objective: Implement a stack using an array in Java with the following functionalities:
  • push: Adds an element to the top of the stack.
  • pop: Removes and returns the top element.
  • peek: Returns the top element without removing it.
  • isEmpty: Checks if the stack is empty. Files Involved:
  • ArrayStack.java
  • Operations_on_Stack.java Functionality:
  • ArrayStack is the core class that defines the stack using an array.
  • Operations_on_Stack.java demonstrates the stack operations such as push, pop, peek, and checking if the stack is empty. Sample Input and Output: Stack Operations:
  1. Push
  2. Pop
  3. Peek
  4. Check if Empty
  5. Exit Enter your choice: 1 Enter an element to push: 10 Element pushed successfully. Enter your choice: 1 Enter an element to push: 20 Element pushed successfully. Enter your choice: 3 Top element: 20 Enter your choice: 2 Popped element: 20 Enter your choice: 4 Stack is not empty. Enter your choice: 5 Exiting... Requirements
  • Java Development Kit (JDK) installed.
  • Basic understanding of Java programming concepts. How to Run the Project
  1. Clone the repository or download the project.
  2. Compile the .java files: javac RemoveVowels.java javac ArrayStack.java Operations_on_Stack.java
  3. Run the files: java RemoveVowels java Operations_on_Stack Author Muskan Patel

About

👋 I'm Muskan Patel, an SDET/QA and Java developer with expertise in automated testing (Cypress, POM) and core Java concepts. Passionate about building robust, maintainable tests for e-commerce applications and implementing object-oriented design principles. Constantly learning and adapting to improve software quality!

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published