Friday, April 26, 2019

W8 CST 338 Software Design


They say hindsight is 20/20, what advice would you give to the next cohort regarding this course?
How much do you envision using the skills you gained in this course in your career?
Good job this session!  You are well on your way to finishing your degree!
Update your learning journal from what you experienced this week with class. 
I would tell the next cohort to keep up with your assignments. Its best to start the final project after Java swing is learned if you’re going to do your project or after Android Studio is learned. If you’re going to do Android Studio, do the tutorials on the website so you can familiarize yourself with it. I had trouble with the assignment from last week so it affected the amount of time I could spend on this assignment since the Final is worth more points. It’s good to meet up with your group on Wednesday or Thursday so everyone can get started early.
I learned how to use GitHub better and Android Studio much better than before. I will always use GitHub because it has all my files saved in one place since I am often between my desktop and laptop am interested in App development so I will probably use that one a lot.

Tuesday, April 23, 2019

W7 CST 338 Software Design


Have you ever created an app before, either for Android or iPhone?  How did it go?
Do you have any ideas for apps that you could create for recreation?  What about business?
Update your learning journal from what you experienced this week with class. 
I have made a basic app for a mini-hackathon using Android Studio about a year ago. At the time, I was using my laptop which is decent for most computer science homework but bad at running Android Studio smoothly or doing that database assignment that had like 10k data points to compile every time. I had major problems working with the constraints. I had never dealt with constraints in Eclipse window builder so this was entirely new. In the end, I think I only got a button to go to the next page with icons that were not yet implemented. I did meet some interesting people who went to the local UC here and have gone on to work at one of like two tech companies in Modesto.
I would like to eventually create an app that is like a Tamogotchi where it needs to be fed and played with or it will die. I also want to make a study app that I started at the previously mentioned mini-hack. The idea is that it gives you study and memorization related tasks and when you get a 7 day streak, you can buy your reward that you specify at the beginning of the week. In the end, you would learn many study skills and techniques like flash cards, flash cards using spaced repetition, Cornell notes, blank document technique, cheat sheet planning, and doing book problems even if they weren’t assigned. When students first get to college, many are not sure how to study after cruising effortlessly through High School, this would aid those students. Many other study apps rely on an hours over results mentality in an effort to make it a roleplaying game.

Tuesday, April 16, 2019

CST 338 Software Design M6

What experience do you have with UML diagrams?
Are they used at your workplace?
Have you done multithreading in any language before?
Did you find Patterns to be helpful?
Update your learning journal from what you experienced this week with class.


I have some experience with UML diagrams from my Java 2 class at Merced College.

I don’t work as a professional.

I have not done any multithreading before but I do see its practical use.

Patterns do seem helpful.


This week, we learned about how to code Multi-threading into a project. Multithreading is where multiple pieces of data are being processed at one time, parallel to each other in theory but taking turns in reality.  In multithreading, Thread.sleep is used to pause a thread. The thread class has objects called threads. It includes run and start that starts the processing. A thread can also be made by implementing the Runnable interface which needs to be from an instance of Thread, so pass the Runnable object to the thread constructor. In multithreading, threads that share a variable can end up with the wrong value, this is called a race condition and is fixed by using the Counter class. Thread synchronization is where threads are forced to wait so another can run. The sections with these issues are called critical regions so use the keyword synchronized to only run one thread at a time.


We also learned how to apply a design pattern in a programming project. Our class used the Model-View-Controller Design pattern. In an MVC pattern, the input and output of a task are separated from the rest of the application. The model is the container, the view is the picture and the controller is the input. There are other patterns such as the Container-Iterator pattern where an object holds multiple pieces of data, the construct iterates through the container. The Adaptor pattern is there one class is changed by adding an interface.

Tuesday, April 9, 2019

CST 338 M5 Software Design


GUI is learned late in the game with Java. Do you think this is helpful or harmful and why?
Why do think that coding the Swing elements in Java would be more difficult compared to some other languages?
Update your learning journal from what you experienced this week with class.
I don't think it is harmful to learn GUI later in Java. It is essential to learn the basics and build on those. Knowing object oriented programming makes larger projects easier because of its reusability. In my App-Development class we learned how to use GUIs but they were largely drag-and-drop. Aside from the use of mouse and click listeners, they are similar.
I am not familiar with the Swing elements equivalents in other languages. If there are libraries, it will probably be no issue. In Python, there are many GUI frameworks like TkInter and other cross platform options like Jython, an implementation of OOP in Python integrated with Java and PyGame, an introduction to game programming. According to some guy on Stackexchange, Java needs to be installed on the computer for it to work, MacOSX has some issues occasionally with it, multi-threading isn’t compatible with it, and the knowledge doesn’t transfer to UI development in other languages.This week, we learned about Swing and Event-Driven programming. Swing is a package that is a better version of the Java Abstract Window Toolkit but doesn’t replace it and is sometimes needed to use Swing. Event driven programming is a form of OOP that uses an event to signal a listener. We also learned about User Interface design by analyzing layout managers, using menus, buttons, text fields, and text areas in GUI programs. A layout manager describes how the components are arranged which include BorderLayout, FlowLayout, and GridLayout. A menu is a, object of the class JMenu filled with menu items which is identified by a string and displayed. A button is from the class JButton which is derived from the abstract class AbstractButton. Objects from the Dimension class are used with buttons and other objects to specify a size in pixels. TextFields are objects from the JTextField class which are used to enter one line of text. Text areas are objects from the JTextArea class and are used to enter multiple lines of text which can be line wrapped using the setLineWrap method. TextFields and TextAreas can be made uneditable using .setEditable(false or true).

Tuesday, April 2, 2019

CST 338 M4 Software Design

Give an example of polymorphism and what what be inherited between classes.
After the learning this week, can you identify the difference between Abstract classes and Interfaces?  Be specific.
Update your learning journal from what you experienced this week with class. 

An example of polymorphism is when many meanings can be attached to one method through late binding/dynamic binding which allows a method in a base class can perform a task even if the task isn't defined. In the powerpoint, the example of Sale and DiscountSale was given. Due to the properties of polymorphism, the Sale class was created and the DiscountSale class with the bill() method did not exist.

         The difference between abstract classes and interfaces is that interfaces can only contain abstract methods, while an abstract class can have default, static, abstract, and non-abstract methods. In an interface, variables are either final or static compared to an abstract class where it can contain final, static, non-static, and non-final variables. The parts in a java interface are public by default, and the abstract class has variables and parts such as private and protected. An abstract class can provide the implementation of an interface where the opposite is not true. An interface can extend another interface where an abstract class can extend other classes and implement multiple interfaces. A java interface is implemented using "implements" and an abstract class is extended with "extends".


         This week, we learned about how to use polymorphism, interfaces, and abstract classes in our Barcode Scanner project. We also learned about UML diagrams in the same project. UML diagrams are software design tools for designing and documenting that can be used in any OOP language. We also learned about the software lifecycle and processes from UML diagrams because they can be used to show a team what functions and variables are used and how each class relates to another. 

Tuesday, March 26, 2019

CST 338 Software Design

What is the largest multi-dimensional array that you have used?
What is the largest that you think would be unwieldy and why?
What does inheritance do for your classes?  Have you used it in the past? How?
Update your learning journal from what you experienced this week with class. 

The largest multi-dimensional array I used was for making a dictionary. If I remember correctly, it had about 50,000 entries. The largest array that is unwieldy depends on the user's computer. If it takes too long to update or read, then it is unwieldy. Inheritance allows for classes to become more useful by adding more instance variables and methods. I have used inheritance in a JWindow app during my Programming II class. I didn't fully understand it until I read ch7.


         This week, we learned about references and class parameters. We also learned more about arrays and references. Arrays are objects that hold the address of where it's object is in memory. It is considered to be a class type. Finally, we learned about design and implement inheritance. Inheritance is a basic tenet of OOP, reusabulity, which include a general form of a class, with specialized versions of the same class added later on. The specialized classes inherit the methods and instance variables of the general class. 

Tuesday, March 19, 2019

CST 338 Software Design

OOP is not in all languages.  Have you used one that does not?
What was your experience?
How extensively have you used OOP outside of the classroom?
Are you experience with UML diagrams and do they help?
Update your learning journal from what you experienced this week with class. 

I have not used OOP when I was learning ActionScript3 in my Adobe Animate CC class. It was an introductory class where Programming II was not required. If I had more knowledge of it, my final project program would have been a lot shorter than 1000 lines. My project was a basic recipe book/app of my favorite recipes separated into different categories like main or side dish, then into various meat or vegetable dishes for main or side dish. A lot of these functions were exactly the same except for the text. I have not used much OOP outside of the classroom. I don't have industry experience yet and my whiteboard interview studies don't include much use of it.
I learned about UML diagrams and used them for a few projects in Programming II. The book we learned from was Intro to Java Programming by David Liang. UML diagrams are informative because they describe the class, data fields, constructors, and relevant methods including data types.
This week, we learned about how to create Object Oriented Programming classes which feature abstraction, inheritance, polymorphism, and encapsulation. OOP allows code to be reused in many ways. We learned about how to use constructors and overload methods. We used arrays and the ArrayList class. An array is used to store a collection of data of the same type. ArrayLists can store objects. We also used static methods and static variables. Static methods can be called without creating an instance of the class and static variables can be accessed by all methods in the class. 

cst 499 week 8

This week, we finished writing the paper in order to do the best job possible even if it was a little bit late. Now that everything is done,...