Skip to content

Latest commit

 

History

History
92 lines (61 loc) · 3.78 KB

File metadata and controls

92 lines (61 loc) · 3.78 KB

Coding Assignment – Associate Software Engineer

This repository contains the solutions to the Associate Software Engineer coding assignment at Cloud Vandana. The tasks cover Java, JavaScript, and HTML, demonstrating problem-solving skills, coding proficiency, and the ability to build functional projects.

Table of Contents

  1. Java Solutions
  2. JavaScript Solutions
  3. HTML Projects

Java Solutions

Shuffle an Array

  • Description: Implemented a custom method to shuffle an array of numbers [1, 2, 3, 4, 5, 6, 7] without using built-in methods like Collections.shuffle().

  • Implementation: The shuffleArray() method uses a random swap algorithm to shuffle the array.


Convert Roman Numerals to Integer

  • Description: Created a function that converts Roman numeral strings (e.g., IX) into their corresponding integer values (e.g., 9).

  • Implementation: The conversion is done using a dictionary of Roman numeral values and iterating over the string.


Pangram Checker

  • Description: A function that checks if a sentence is a pangram (contains all the letters of the alphabet at least once).

  • Implementation: The string is converted to lowercase and checked using a set to ensure all letters are present.


JavaScript Solutions

Reverse Words in a Sentence

  • Description: A function that reverses each word in a sentence without changing the word order.

  • Implementation: The sentence is split into words, and each word is reversed individually.


Sort Array in Descending Order

  • Description: A custom sorting algorithm to sort an array in descending order without relying on JavaScript's built-in sort() method.

  • Implementation: A simple sorting algorithm, like bubble sort, is used to sort the array in descending order.


HTML Projects

Basic Calculator

  • Description: A simple Basic Calculator built using HTML, CSS, and JavaScript. The calculator performs basic arithmetic operations such as addition, subtraction, multiplication, and division.

  • Live Demo: Basic Calculator


Survey Form

  • Description: A Survey Form that collects user information such as Name, Date of Birth, Gender, Profession, Email, and Mobile Number. It includes form validation to ensure all fields are completed before submission.

  • Live Demo: Survey Form


How to Run the Code

Java:

  1. Clone the repository or download the files.
  2. Navigate to the Java files (ShuffleArray.java, RomanToInteger.java, PangramChecker.java).
  3. Compile and run the Java files in your IDE or terminal.

JavaScript (Node.js):

  1. Clone the repository or download the files.
  2. Ensure Node.js is installed. You can download it from here.
  3. Open a terminal and navigate to the JavaScript files (reverseWords.js, sortArray.js).
  4. Run the JavaScript files using Node.js:
    node reverseWords.js
    node sortArray.js

HTML:

  1. Open basicCalculator.html or surveyForm.html in any modern web browser to interact with the projects.
  2. Both projects are functional with embedded JavaScript for interactivity.