We have been looking at different chatbots with the intention of creating our own. Chatbots are a very simple version of an AI that can respond to what you write. Chatbots work by "reading" what you write and then choosing a predetermined answer based on certain keywords in your responses. If there are no keywords in your response, the chatbot will pick a response from a random list. We have been looking at already written code to see how chatbots pick their responses and how they "read" what the user enters. We hope to use the information that we are learning to create our own simple chatbot. When we finish, it will hopefully be able to respond to several different keywords and make responses that actually make sense. The picture below is a conversation with an online chatbot.
C++ The Learning Curve
Monday, May 9, 2016
Sunday, May 1, 2016
Basic Windows Application Programming: Part I
With our first program virtually at its completion, we can now set our sight on integration into an actual Windows application, not just a command prompt program. This crucial next step of development requires extensive knowledge of coding far beyond what we know at the moment, so, currently, we've recruited the trusted Dev C++ programming application to do this for us. It does so by pasting the necessary code for an actual application, also known as a Guided User Interface, or GUI for short, into our existing code. This makes sure we don't have to worry about the visuals of the application, as much as the function of it. Below is a screenshot of the code which Dev C++ injects into the program. This method of coding allows more customization of the aesthetics, and form of the program, whereas regular command prompt programming is very bland and one-sided.
Physics Program Finished... For Now
Over the past few weeks, we've been hard at work on our first bona fide physics program, and now it's complete (at least for now). At the moment, it only contains 12 of the most rudimentary physics equations used, but we plan on adding much more down the road. It will hopefully contain other helpful tools besides equation solving, such as projectile motion graphing, electric field mapping, and wave models. This is just the first step on our journey to bigger, more demanding programs which we hope to create later as part of our project. Below is a link to Dropbox, where you can download the program itself, which can be run on any Windows PC. There is also a link for the code. Don't be fooled by the monstrous amount of code; everything this program does has been programmed using no more than 5 or 6 commands.
Here's a screenshot of the program in action:
Monday, April 11, 2016
The Math Class
The math class will be a very important part of our final program. The math class has various math related functions that can help us. There are functions that can compute the sin, cos, and tan of an angle. In our physics program these can be used to find the direction of vectors and the magnitude of their components. The class also contains functions that compute the square roots and exponents. These would be important because a lot of physics problems contain exponents and square roots. The class contains different functions for rounding which would allow the user to choose what place to round the answer to. The picture shows a simple code that computes the value of the square root of 4. The math class will be very helpful in creating our final program.
Thursday, March 31, 2016
Physics!!!
Everybody loves when someone else can do a physics problem for them.
That's why we've been hard at work creating a program that incorporates
every single physics equation, complete with the ability to solve for
any variable. Through the use of many conditional statements, switches,
and what will be hundreds of line of code, we hope to bring forth
something that can help you finish your physics homework in 60 seconds
or less!
This just might be our final product down the line, but we are not sure at this point if such a feat is possible. However, that's exactly what we set out to do, create something we never thought we could do.
This just might be our final product down the line, but we are not sure at this point if such a feat is possible. However, that's exactly what we set out to do, create something we never thought we could do.
Monday, March 28, 2016
Classes
Classes are the basis for object oriented programming. This week we learne
d how to create classes and objects to improve our code. The class is like a blueprint, it describes the object and how it will function. The object is the actual interpretation of the class. Objects can come from the same class, but have different features. This is like how a builder can make houses with the same blueprints but they can have different colored doors and slightly different layouts. Methods define the behavior of the class. Methods can be thought of as verbs while the object is the noun that does the action. Methods and variables in classes can be defined as public or private. Public variables and methods can be accessed from anywhere while private methods can only be accessed from within the class. Creating private methods allow the programmer to restrict access to certain features of their code which can help to stop bugs.
d how to create classes and objects to improve our code. The class is like a blueprint, it describes the object and how it will function. The object is the actual interpretation of the class. Objects can come from the same class, but have different features. This is like how a builder can make houses with the same blueprints but they can have different colored doors and slightly different layouts. Methods define the behavior of the class. Methods can be thought of as verbs while the object is the noun that does the action. Methods and variables in classes can be defined as public or private. Public variables and methods can be accessed from anywhere while private methods can only be accessed from within the class. Creating private methods allow the programmer to restrict access to certain features of their code which can help to stop bugs.
Monday, March 14, 2016
Encapsulation
This week, we finally learned how to keep the NSA's prying eyes from our precious program data, with the use of the Encapsulation method. This coding technique virtually "encapsulates" the data you choose, as to prevent other parts of a program, or even the outside world, from accessing and changing the data.
This can be useful for keeping certain data types constant, while allowing certain subsets within it to be changed. The same can be done with "viewing rights," as you can designate which class and objects can be seen or not seen by the public. In the example below, the data class "myAccount" is visible to the public, as well as the account # associated with it. If set to "private" instead, only the class will be visible, not the #. This has many real world applications, especially in the financial industry.
Subscribe to:
Comments (Atom)



