Package com.groupProject
Class CalculationPoints
- java.lang.Object
-
- com.groupProject.CalculationPoints
-
public class CalculationPoints extends java.lang.Object
CalculationPoints class uses to count the total points for each state.- Since:
- 2019-04-19
- Version:
- 1.0
- Author:
- Liew Sin Hui
-
-
Constructor Summary
Constructors Constructor Description CalculationPoints()
CalculationPoints(java.lang.Double grandTotalPointer, java.lang.Double sumGrandTotalPointer)
This constructs a points statistic with a specified grandTotalPointer and sumGrandTotalPointer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calculateTotalPointer(java.util.Vector<java.lang.Double> a)
calculateTotalPointer method is count the total points for each statevoid
catState(java.lang.String states, java.lang.String cat, double pointer)
catState method will get information about the points statistic with a specified states, cat and pointerjava.lang.String
getCat()
get category namejava.lang.Double
getGrandTotalPointer()
get total points for each state.java.lang.Double
getPointer()
get total points for each state by categoryjava.lang.String
getStates()
get state namejava.lang.Double
getSumGrandTotalPointer()
get total of all pointsvoid
printFinalResultPointer(double sumGrandTotalPointer)
void
printGrandTotalPointer()
void
printResultPointer()
-
-
-
Constructor Detail
-
CalculationPoints
public CalculationPoints()
-
CalculationPoints
public CalculationPoints(java.lang.Double grandTotalPointer, java.lang.Double sumGrandTotalPointer)
This constructs a points statistic with a specified grandTotalPointer and sumGrandTotalPointer- Parameters:
grandTotalPointer
- an initial for total points for each state.sumGrandTotalPointer
- an initial for count all the points.
-
-
Method Detail
-
catState
public void catState(java.lang.String states, java.lang.String cat, double pointer)
catState method will get information about the points statistic with a specified states, cat and pointer- Parameters:
states
- name of statescat
- name of categorypointer
- total points for each state by category from current validTableLink
-
getCat
public java.lang.String getCat()
get category name- Returns:
- category name
-
getStates
public java.lang.String getStates()
get state name- Returns:
- state name
-
getPointer
public java.lang.Double getPointer()
get total points for each state by category- Returns:
- total points for each state by category.
-
getGrandTotalPointer
public java.lang.Double getGrandTotalPointer()
get total points for each state.- Returns:
- total points for each state.
-
calculateTotalPointer
public void calculateTotalPointer(java.util.Vector<java.lang.Double> a)
calculateTotalPointer method is count the total points for each state- Parameters:
a
- the total points for each state by category from current validTableLink.
-
getSumGrandTotalPointer
public java.lang.Double getSumGrandTotalPointer()
get total of all points- Returns:
- total of all points
-
printResultPointer
public void printResultPointer()
-
printGrandTotalPointer
public void printGrandTotalPointer()
-
printFinalResultPointer
public void printFinalResultPointer(double sumGrandTotalPointer)
-
-