Giter VIP home page Giter VIP logo

java's Introduction

Java

Get given source codes from here and upload your assignment in time !

Complete/Solve all given patterns. If you have any problem regarding these pattern generation, first run your friend's code first.

Only 5 Patterns maybe hard to you: #5 #6 #13 #14 #21

java's People

Contributors

ersks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

java's Issues

Implement Java Inheritance - Employee

Employee

  • name
  • dept
  • salary

PermanentEmployee extends Employee

  • pf - boolean
    sal - 10% Increases
    tax - 20%

TemporaryEmployee extends Employee
no pf
tax - 15%

Decode CRN

Develop a java program to display Batch, Department & Roll Number of user input. User input should be 6-character string such as 710339, 650101, etc.

#Example:
User Input: 71AB39 - Not a valid CRN
User Input: 7103396 - Not a valid CRN
User Input: Nepal - Not a valid CRN
User Input: 710339 - Valid CRN

Decoded Output

Batch: 2071
Department: Computer Engineering
Roll No.: 39

Submit Pattern1

Way to submit your Code and Output:

Code:
package pattern1;

/**
*

  • @author ErSKS
    */
    public class Pattern1 {

    /**

    • @param args the command line arguments
      /
      public static void main(String[] args) {
      for (int i = 0; i < 5; i++) {
      for (int j = 0; j < 5; j++) {
      System.out.print("
      ");
      }
      System.out.println("");
      }
      }

}

Output
pattern1

Develop - Lucky7 Game

  • Using Random Number between 0-9
  • Analyse Loop : which is better, for or while?

Hint:-

Random r = new Random();
sout(r.nextInt(10));

Develop - Fibonacci Number Checker

Develop a method static boolean isFibonacciNumber(int n)

        System.out.println("1 true:" + isFibonacciNumber(1));
        System.out.println("2 true:" + isFibonacciNumber(2));
        System.out.println("3 true:" + isFibonacciNumber(3));
        System.out.println("4 false:" + isFibonacciNumber(4));
        System.out.println("5 true:" + isFibonacciNumber(5));
        System.out.println("11 false:" + isFibonacciNumber(11));
        System.out.println("21 true:" + isFibonacciNumber(21));

Develop - BunkerArray

Develop a static method static boolean isBunker(int[] a) {} for the following PSVM

public static void main(String[] args) {
        System.out.println("Bunker Array - contains the value 1 if and only if it contains a prime number");
        System.out.println("{7, 6, 10, 1} true:" + isBunker(new int[]{7, 6, 10, 1}));
        System.out.println("{7, 6, 10} false:" + isBunker(new int[]{7, 6, 10}));
        System.out.println("{6, 10, 1} false:" + isBunker(new int[]{6, 10, 1}));
        System.out.println("{3, 7, 1, 8, 1} true:" + isBunker(new int[]{3, 7, 1, 8, 1}));
        System.out.println("{7, 6, 10, 9, 5, 0, 1} true:" + isBunker(new int[]{7, 6, 10, 9, 5, 0, 1}));

        System.out.println("{7, 10} false:" + isBunker(new int[]{7, 10}));
        System.out.println("{6, 1} false:" + isBunker(new int[]{6, 1}));
        System.out.println("{3, 1, 1} true:" + isBunker(new int[]{3, 1, 1}));
}

Implement Java Inheritance - Vehicle

Vehicle

  • color
  • noOfGears
  • noOfWheels
  • speed
  • noOfDoors

Car extends Vehicle

  • price
  • controlSpeed() - 120 kmph

Truck extends Vehicle

  • controlSpeed() - 75 kmph

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.