GithubHelp home page GithubHelp logo

course-project-codemonkeys's People

Contributors

a663e-36z1120 avatar charlieguo2021 avatar edward11235 avatar github-classroom[bot] avatar jacksunjm avatar langsonzhang avatar raymondzhang24 avatar tammyliuu avatar vim0315 avatar

Stargazers

 avatar

Watchers

 avatar

course-project-codemonkeys's Issues

TODO

More command needed
Discord plug-in

Command Parser New Command

Please consider adding a new command in the command parser so that the save process will be executed only when it's needed, to avoid unnecessary saves that possibly cost a significant amount of time

How the user classes works have been changed. Please see the comment for details.

When creating an ordinary user(with no authorities), create a CommonUser object.
When granting ban authority to a user, do user = new BanAuthority(user).
It is the same when granting control vote authority.

In addition, a Check_Authority method has been added. One can use it to check if the user has a certain authority.
For example, user.Check_Authority("Ban") returns true if the user has ban authority, and returns false otherwise.

The usage of Users in higher layers needs to be changed. Please feel free to contact me if you have any concerns/suggestions.

How can we use api in command

The Yahoo finance API is needed for commands such as check price, buy and sell, upvote and downvote.
How can we get the API or can we create a YahooFinaceApi instance in command?

Vote parameter

The initiator of a vote can be any user instead of only common user

Identifiable class

After reviewing our current codebase, I found that identifiable is an abstract class, not an interface. Would it be better if we change identifiable to an interface?

Entity Portfolio Code Re-usability

In the portfolio class, there are add and subtraction methods for a list of transactions, votes, and assets. The code can be refactored in future time.

Proposal: <Interface> ClientInterface

Why:
Currently our Commands have no way of returning information to the client other than to hardcode it. For example, the "Help" command can print out a string to the terminal in IntelliJ, but then it cannot send that string to be printed in a discord server. So the purpose of ClientInterface is to serve as an extra layer between our UI, whether it's a command line or discord bot, and our actual business logic. This way, Commands can do tasks and return meaningful information without worrying about where to output that information. The "where" logic can be handled by new classes that implement ClientInterface, which in my opinion makes our program a lot more flexible and clean.

Responsibilities:

  • To provide a method of returning information to the client

Implementation:

  • input() method which handles any information passed from the client to our program
  • output() method which handles any information passed from our program to the client
  • Example: DiscordClientInterface allows inputs and outputs from Discord via the API
  • Example: CommandLineClientInterface (or just CommandLine) allows inputs from the terminal, and outputs via system.out.println()

If this is to be implemented, then we need to change CommandParser and Command to take an extra parameter which is ClientInterface. Essentially, this allows our program to know what is coming in and*where it is coming in from.

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.