Giter Club home page Giter Club logo

test1_20160421's Introduction

Test1_20160421

Write a super class named SuperList, within which there is a method that returns true if two arrays (list1 and list2) are strictly identical (two arrays list1 and list2 are strictly identical if they have the same length and list1[i] is equal to list2[i] for each i.), using the following header:

                  public boolean equal(int[] list1, int[] list2)

Write a child class named ChildList, within which the method equal is overridden, to return true if list1 and list2 are identical, using the same header as above. Only this time, two arrays list1 and list2 are identical if they have the same contents.

Write a test program named TestList that prompts the user to enter two lists of integers (with the size from user input), use the two methods from the super class and child class, respectively, and displays whether the two are strictly identical or identical or neither.

//Here are two sample runs.

notice:

import java.util.Arrays;

public boolean equal(int[] list1,int[] list2){
	boolean t=Arrays.equals(list1, list2);
	return t;
}

test1_20160421's People

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.