|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcw3e
Author: Joanne Louise Carter
Date: 06/01/05
Module: G6DICP Introduction to Computer Programming
Title: ICP Coursework 3
SCSiT Username: jxc04m
This program implements the entire TPL specification and extends it - the extended functions are
documented in the readme.txt and include: BOOLEAN (TRUE/FALSE), CALCULATE on STRING, IF and END IF, and INPUT
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 | |
cw3e()
|
Method Summary | |
static void |
calculate(java.lang.String currentLine,
int lineCounter,
java.util.Vector tplData)
This method implements the CALCULATE function. |
static void |
createBoolean(java.lang.String currentLine,
int lineCounter,
java.util.Vector tplData)
This method creates a new TPLboolean variable and instantiates it. |
static void |
createInteger(java.lang.String currentLine,
int lineCounter,
java.util.Vector tplData)
This method creates a new TPLinteger variable and instantiates it. |
static void |
createString(java.lang.String currentLine,
int lineCounter,
java.util.Vector tplData)
This method creates a new TPLstring variable and instantiates it. |
static int |
ifStatement(java.lang.String currentLine,
int lineCounter,
java.util.Vector tplData)
An IF statement. |
static void |
let(java.lang.String currentLine,
int lineCounter,
java.util.Vector tplData)
This method deals with assigning values to variables. |
static void |
main(java.lang.String[] args)
The main method. |
static void |
print(java.lang.String currentLine,
int lineCounter,
java.util.Vector tplData)
This method takes the current line of code, processes it and then prints a result (a line of text, variable data etc) according to whether it is PRINT or PRINTLN. |
static void |
userInput(java.lang.String currentLine,
int lineCounter,
java.util.Vector tplData)
This method asks the user for input for a variable value, then assigns the variable that value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public cw3e()
Method Detail |
public static void print(java.lang.String currentLine, int lineCounter, java.util.Vector tplData)
currentLine
- The current line of code to be processedlineCounter
- Keeps track of how many lines of code have been processedtplData
- The Vector containing all the variables for the programpublic static void createString(java.lang.String currentLine, int lineCounter, java.util.Vector tplData)
currentLine
- The current line of code to be processedlineCounter
- Keeps track of how many lines of code have been processedtplData
- The Vector containing all the variables for the programpublic static void createInteger(java.lang.String currentLine, int lineCounter, java.util.Vector tplData)
currentLine
- The current line of code to be processedlineCounter
- Keeps track of how many lines of code have been processedtplData
- The Vector containing all the variables for the programpublic static void createBoolean(java.lang.String currentLine, int lineCounter, java.util.Vector tplData)
currentLine
- The current line of code to be processedlineCounter
- Keeps track of how many lines of code have been processedtplData
- The Vector containing all the variables for the programpublic static void let(java.lang.String currentLine, int lineCounter, java.util.Vector tplData)
currentLine
- The current line of code to be processedlineCounter
- Keeps track of how many lines of code have been processedtplData
- The Vector containing all the variables for the programpublic static void calculate(java.lang.String currentLine, int lineCounter, java.util.Vector tplData)
currentLine
- The current line of code to be processedlineCounter
- Keeps track of how many lines of code have been processedtplData
- The Vector containing all the variables for the programpublic static int ifStatement(java.lang.String currentLine, int lineCounter, java.util.Vector tplData)
currentLine
- The current line of code to be processedlineCounter
- Keeps track of how many lines of code have been processedtplData
- The Vector containing all the variables for the program
public static void userInput(java.lang.String currentLine, int lineCounter, java.util.Vector tplData)
currentLine
- The current line of code to be processedlineCounter
- Keeps track of how many lines of code have been processedtplData
- The Vector containing all the variables for the programpublic static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |