Git Product home page Git Product logo

foxmula's Introduction

Foxmula Intern Assignments

Assignment 1

  1. Create a class called Time, which has three private instance variables โ€“ hour, min and sec. It contains a method called add ( ) which takes one Time object as parameter and print the added value of the calling Time object and passes Time object. In the main method, declare two Time objects and assign values using constructor and call the add ( ) method.

  2. Create a class Stack that declares a stack and the methods to perform push ( ), pop ( ) and checkEmpty ( ) operations on the stack. Create two stacks and write a menu-driven program to perform operations on the two stacks. Whenever the number of elements in the two stacks becomes equal, a message should automatically be generated displaying the number of elements in each stack.

  3. Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the super class of the hierarchy. The instance variables of Quadrilateral should be the x-y coordinate pairs for the four endpoints of the Quadrilateral. Write a program that instantiates objects of your classes and out.

Assignment 2

  1. Write a program to check whether an array list contains an element or not.
  2. Write a program to check whether set contains an element or not.
  3. Write a program to traverse HashSet.
  4. Write a program to traverse Tree Set. 5.Write a program to calculate occurrences of each element of an array list.
  5. Write a program to find the Pair from an array list whose sum will be K, where K will be taken as input.

Assignment 3

  1. Write a program to calculate frequency/occurrences of each element of an array.
  2. Write a program which will take a number as input. If number is prime and odd, then it will throw Custom Exception with proper message Number is invalid.
  3. Write a program calculate frequency/occurrences of each element of an array and then sort by value and then print it.

foxmula's People

Contributors

muskan399 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.