Package com.groupProject
Class CalculationPoints
- java.lang.Object
-
- com.groupProject.CalculationPoints
-
public class CalculationPoints extends java.lang.ObjectCalculationPoints 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 voidcalculateTotalPointer(java.util.Vector<java.lang.Double> a)calculateTotalPointer method is count the total points for each statevoidcatState(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.StringgetCat()get category namejava.lang.DoublegetGrandTotalPointer()get total points for each state.java.lang.DoublegetPointer()get total points for each state by categoryjava.lang.StringgetStates()get state namejava.lang.DoublegetSumGrandTotalPointer()get total of all pointsvoidprintFinalResultPointer(double sumGrandTotalPointer)voidprintGrandTotalPointer()voidprintResultPointer()
-
-
-
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)
-
-