Coder Social home page Coder Social logo

textexcel's Introduction

TextExcel

A wonderful APCS project in Java. Basically ed for a spreadsheet

Grand Scheme

Feel free to do PRs against this document if you feel something should be different

Remember, avoid stupid getter/setters, instead be clever!

Spreadsheet

Spreadsheet contains a matrix of Values that represent it's cells
Can obtain the Value at a index with valueAt

Value hierarchy

Value: base class, all values can be refine()'d in the context of some Spreadsheet, which by default will simpily return the value itself. In addition all Values should have a useful toString method
Number: a decimal value, represented by a double
StringValue: a string value
CellReference: a value that holds a cell's row and column, and when it is refine()'d it returns the value in that cell
DeferredExpression: a value that, when refine()'d, returns the evaluation of it's child expression
ErrorValue: a value that represents a error resulting from a evaluation/refinement

Expression hierarchy

Expression: base class, all expressions can be evaluate()'d in the context of some Spreadsheet
ValueExpression: a expression that represents a basic value (number, string, cellref or deferred expr)
AddExpression: a expression that evaluates to the addition of the evaluation of its two arguments
SubExpression: same as AddExpression with subtraction
Term: another base class
MulTerm: a expression that evaluates to the multiplication of the evalution of its two arguments
DivTerm: same as MulTerm with division
AssignmentExpression: a expression that assigns the value on the left of a = to the value on the right

Parser

Parser class will have a public method that takes a String and returns a Expression named parse

Main

Main class will run the basic command line, which will read a line of input, see if it is a special command (print or quit), then invoke either the special command or parse the line and evaluate the expression, printing the resulting value

textexcel's People

Contributors

tflexsoom avatar andrew-pa avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Forkers

briantliao

textexcel's Issues

Error Handling

Yay! Extra credit for this! Still really broken there's a lot of ways to crash this so far

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.