|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcw3d
public class cw3d
Author: Joanne Louise Carter
Date: 02/01/05
Module: G6DICP Introduction to Computer Programming
Title: ICP Coursework 3
SCSiT Username: jxc04m
This program implements the entire TPL specification. If an error is found then an appropriate
error message is printed and the program ends - you must correct the error(s) to have the program
run to completion.
Constructor Summary | |
---|---|
cw3d()
|
Method Summary | |
---|---|
static int |
getInt(java.util.Vector<TPLvariable> tplData,
java.lang.String varORint,
int lineCounter)
This method is to aid in calculations. |
static void |
main(java.lang.String[] args)
The main method. |
static int |
searchVector(java.util.Vector<TPLvariable> tplData,
java.lang.String var)
This method searches through the tplData Vector to find a specific variable. |
static int |
str2int(java.lang.String str2convert)
This method converts a string to an integer. |
static int |
variableType(java.util.Vector<TPLvariable> tplData,
int index)
This method takes the variable from the Vector at the specified index and returns the data type (INTEGER or STRING) of the variable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public cw3d()
Method Detail |
---|
public static int searchVector(java.util.Vector<TPLvariable> tplData, java.lang.String var)
tplData
- Contains the TPL variables, can be searched through. TPLvariable is the
type of object that can be put into the Vector.var
- String containing the variable name to be searched for.
public static int variableType(java.util.Vector<TPLvariable> tplData, int index)
tplData
- Contains the TPL variables, can be searched through. TPLvariable is the type
of object that can be put into the Vector.index
- The position of the variable in the Vector.
public static int str2int(java.lang.String str2convert)
str2convert
- The String that is to be converted to an integer.
public static int getInt(java.util.Vector<TPLvariable> tplData, java.lang.String varORint, int lineCounter)
tplData
- Contains the TPL variables, can be searched through. TPLvariable is the type
of object that can be put into the Vector.varORint
- The String from the CALCULATE statement, which is either a variable name or an
integer.lineCounter
- Counts the number of lines processed, shows where the error is.
public static void main(java.lang.String[] args)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |