zoukankan      html  css  js  c++  java
  • JAVA EXAM3 复习提纲

    【Practice11_Zipcode_ArrayList】 

    Zipcode class:

    //3 variables: zipcode, city, county, and compare by county

     

    //define getter and setter so that it could be used to get the variable

     

    County:

    //two variables: county and count, and define the getters & setters

     

    Main:

    //1.read the files, 

    //no need to define here since it was passed later on

    //use += for string

     

    //2.

    ZipcodeComparator:

    compare the zipcode by the county?

     

    //2.

    CountyComparator:

    compare the county by their count

     

    //read file by passing into file's name

    //define two lists to use

    //3 initialize zipcode

    //sort the list using the Collections.sort

    //4 initialize cities

    //append the new county's name to the string's name

    //split up all the country words, 5.count the zipcode

    //new up a number list to store the number accounts

    //count the numbers one by one

    //append the count to the number list

    //new up a county object and add it to the state list 6. count the cities

    //sort after appended to the list using Collections.sort

    //print out the state's names

    【Zipcode Hashmap】

     zipmap: 

    //initialize variables : city/country/zipcode, same constructor

     

    main:

    //split the words and set up zipmap object

    //dirty number? add only if they equal in both city and county

    //add to indicate duplication for further query

    //just one city/county equal?

    //using printf to format output

     

     

    【movie】

     

     

    Genre class:

    //define variables: string and arraylist

    //define compare to method and compare via one variable

     

     

    //if o comes later, from small to big

     

    //override the hashcode method

    //override the equals method

     

    Movie class:

    same

     

    MyFlix class:

    //loadMovies:

    load movie information and the movie genres information

    //loadGenres://use iterator to parse all the movies, //get next movie, //get next genre,

    //if not contain the genre, add to the new list,

    //if contains the genre, add to the list

    //rewrite, add to result if it contains

     

    //rewrite: print by using iteration

     

    【words】

     

     

    Word: 

    //define toString here : word + ": " + meaning

     

    //should notice the lower case situation

    Dictionary class:

    //re: put into map according to the requirement

     

    //get a new word

    //add up on

    //or add a new list

     

    searchWordList:

    //re: find in the wordList, use found variable to controll

     

    searchMultiMap

    //print out the results found in the map

     

  • 相关阅读:
    php 时间段查询排序分组
    php 导出word
    关于UVM driver的幕后
    三次握手的必要性
    如何卸载360天擎之火绒与天擎相爱相杀
    【虚拟机】VirtualBox设置共享文件夹
    【数据结构与算法】打开转盘锁:使用图的广度优先遍历实现
    【Python】PDF文档导出指定章节为TXT
    【数据结构与算法】不同路径 III:使用哈密尔顿路径算法实现
    【Java】可比较泛型建数组传递报强转类型错误解决方案
  • 原文地址:https://www.cnblogs.com/immiao0319/p/9938034.html
Copyright © 2011-2022 走看看