Chapter 7 Flashcards
What are the four basic activities of software creation?
- establishing the requirements
- creating a design
- implementing the code (the easiest part actually)
- testing the implementation
What are software requirements?
The list of software requirements is list that specifies WHAT the program should do. These requirements must be analyzed and critiqued, leading to other requirements.
What is the design of a program?
The design specifies the WAY the program is going to accomplish its requirements.
The design should break every requirement into small pieces and manageable pieces.
The design also structures classes and object and the way they will interact with the program.
What is implementation in a program?
The implementation is the process of TRANSLATING design into a code.
What is testing in a program?
Testing is process in which the software is put under any possible circumstance to CHECK whether the requirements will be fulfilled and what errors or vulnerabilities can the program have.
Debugging will be the process in which problems and errors will be addressed and solved.
What is the lengthiest process in software development?
Maintenance: it will exist as long as the program does.
What is the build-and-fix approach of software development?
It’s the act of building a program that hasn’t been well structured and that with errors and bad design is attempted to be fixed piece by piece when the code is already in place.
What does persistence mean?
Persistence is the concept of an object remaining stored in memory even after the termination of a program that used it.
What is the difference between a normal method and a stiatic method?
A normal method is invoked by calling it on an object of class containing the method.
A static method is one that can be invoked by referencing the class name.
What is the difference between a normal variable and a static variable?
A normal variable is different for every object of the class.
A static variable is a variable that is shared across all objects of a class. This doesn’t mean that the variable is a constant, but it means that every instance of the class refers to the same variable: changing it in one object will change it for every other class as well.
Sometimes static methods cannot reference instance variables. Why?
Static methods cannot reference instance variables, before an object has been created, as the referenced variables start to exist only with the existence of an object.
What kinds of variables and methods can the main method of any class reference?
The main method is static and can refer to static or local variables and static methods. The main method cannot refer to instance variables and non-static methods, unless its variables or non-static methods are called thorugh referencing the object.
What is a dependency between classes?
A dependency means, that a class relies on another in some way, usually by invoking methods of the other.
What is an aggregate object?
An aggregate object is made up of other objects, whose references are stores as instance variables.
Example: public class Student {
private String firstName, lastName ; ok
private Address homeAddress, schoolAddress;
…
}
public class Address { .... }
What is a Java interface? How is it instantiated?
In Java, an interface is a collection of abstract methods and constants.
An interface cannot be instantiated.
It looks something like this:
public interface Doable { public void doThis(); public int doThat(); ... }