SER216 Final
What are the strengths to the V-Shaped SDLC model?
- Emphasize planning for verification and validation of the product in early stages of product development - Each deliverable must be testable - Project management can track progress by milestones - Easy to use
When should an exception be thrown?
- When an exception occurs in a method -If you want the exception to be processed by its caller, you should create an exception object and throw it. -If you can handle the exception in the method where it occurs, there is no need to throw it.
What is a model?
An abstraction describing a system or a subsystem
Define 'failure'
Any deviation of the observed behavior from the specified behavior
How do we test the functional model?
Black-box testing
What is a chart diagram?
Describes the dynamic behavior of an individual object
Select the basic PSP1 data measures that are tracked and estimated: a. Time Spent by phase b. Program Size c. Budget spent by phase d. Resources spent by phase e. Defects found and injected by phase
a. Time Spent by phase b. Program Size e. Defects found and injected by phase
Choose the most appropriate generic software process model that might be used as a basis for managing the development of the following system: "A system to control anti-lock braking in a car" a. V-Shaped Model b. Structures Evolutionary Prototyping Model c. Spiral Model d. Rapid Application Development (RAD) Model
a. V-Shaped Model
2 important kinds of hierarchy are _____ and _____
part of, is kind of
What are two important types of hierarchies?
"Part-of" hierarchy "is-kind-of" hierarchy
What are the three types of abstract system model that are recommended by the Model-driven Architecture (MDA) method?
- A computation-independent model (CIM) - One or more platform-specific models (PSMs) - A platform-independent model (PIM)
What are some deficiencies of the waterfall SDLC model?
- All requirements must be known upfront - Deliverables created for each phase are considered frozen - inhibits flexibility - Can give a false impression of progress - Does not reflect problem-solving nature of software development - iterations of phases - Integration is one big bang at the end - Little opportunity for customer to preview the system (until it may be too late)
What are the rules for writing an anonymous inner class?
- An anonymous inner class must always extend a superclass or implement an interface, but it cannot have an explicit extends or implements clause. - An anonymous inner class must implement all the abstract methods in the superclass or in the interface. - An anonymous inner class always uses the no-arg constructor from its superclass to create an instance. - An anonymous inner class is compiled into a class named OuterClassName$n.class. For example, if the outer class Test has two anonymous inner classes, these two classes are compiled into Test$1.class and Test$2.class.
What is the basic structure of JavaFX?
- Application - Override the start(Stage) method - Stage, Scene, and Nodes
If the input is valid across a range of values, what ranges should be tested during test cases?
- Below the range - Within the range - Above the range
What are the weaknesses to the V-Shaped SDLC model?
- Does not easily handle concurrent events - Does not handle iterations or phases - Does not easily handle dynamic changes in requirements - Does not contain risk analysis activities
When is a class diagram used?
- During requirements analysis to model application domain concepts - During system design to model subsystems - During object design to specify the detailed behavior and attributes of classes
What are the strengths of the waterfall model?
- Easy to understand, easy to use - Provides structure to inexperienced staff - Milestones are well understood - Sets requirements stability - Good for management control (plan, staff, track) - Works well when quality is more important than cost or schedule
What does the JavaFX concept, binding property, do?
- Enables a target object to be bound to a source object - If the value in the source object changes, the target property is also changed automatically. - The target object is simply called a binding object or a binding property.
What are the claimed benefits of model-driven engineering?
- Engineers can work at a high level of abstraction without concern for implementation details - By using powerful generation tools, implementation of the same system can be automatically generated for different platforms -Errors are reduces and the design and implementation process is faster
What is acceptance testing?
- Evaluates the system delivered by developers - Carried out by the client. May involve executing typical transactions on site on a trial basis - Goal: Demonstrate that the system meets the requirements and is ready to use.
When should the V-Shaped SDLC model be used?
- Excellent choice for systems requiring high reliability - hospital patient control applications - All requirements are known up-front - When it can be modified to handle changing requirements beyond analysis phase - Solution and technology are known
When should the waterfall SDLC model be used?
- Requirements are very well known - Product definition is stable - Technology is understood - New version of an existing product - Porting an existing product to a new platform.
What UML diagram types may be used to represent the essential features of a system?
- State diagrams - Activity diagrams - Class diagrams - Use case diagrams
What is unit testing?
- To test an individual component (class or subsystem) - Carried out by developers - Goal: Confirm that the component or subsystem is correctly coded and carries out the intended functionality
What is integration testing?
- To test groups of subsystems (collection of subsystems) and eventually the entire system - Carried out by developers - Goal: Test the interfaces among the subsystems.
What is system testing?
- To test the entire system - Carried out by developers - Goal: Determine if the system meets the requirements (functional and nonfunctional)
What are some typical lifecycle questions?
- Which activities should I select for the software project? − What are the dependencies between activities? − How should I schedule the activities?
What is the test-driven development cycle?
- add a test - run the automated test and see it fail - write some code - run the automated test and see it succeed - refactor the code
What are the principal components of a textual use-case description?
- postconditions of the use case - the actors involved - preconditions of the use case - a description of the interactions - special requirements and other information
If the input is valid only if it is a member of a discrete set, what test cases should be used?
- valid discrete values - invalid discrete values
Which association do we use to model for every object there exists only one object
1-to-1 association, for instance, for every country there is 1 capital city
Which association do we use to model for every object there exists many objects of another type
1-to-many association, for instance, for every polygon there exists many x and y integer measurements
In what three ways do we deal with complexity?
1. Abstraction 2. Decomposition 3. Hierarchy
What 6 parts comprise of the textual use case description?
1. Unique name 2. Participating actors 3. Entry conditions 4. Exit conditions 5. Flow of events 6. Special requirements
What is the lifecycle of testing?
1. Unit testing 2. Integration testing 3. System testing 4. Acceptance testing
Which of the following statements is true? 1. The throw statement is used to access an exception parameter. 2. The throw statement is used to throw an exception. 3. The throw statement is used to specify that a method will throw an exception. 4.All of the above.
2. The throw statement is used to throw an exception
______ Javadoc tag describes an argument of method or constructor.
@param
What is the difference between a class and an object?
A class is a template for an object. The object is the instance that actually contains the data
Define 'Software Engineering'
A collection of techniques, methodologies and tools that help with the production of: 1. a high quality software system 2. within a given budget 3. before a given deadline while change occurs
What is an SDLC model?
A framework that describes the activities performed at each stage of a software development project
What is a class?
A group of objects with: similar properties (attributes) common behavior (operations) common relationships to other objects (associations) common semantics
What is JavaFX?
A new framework for developing Java GUI programs
What is model notation?
A set of graphical or textual rules for depicting models and views
What is an aggregation?
A special case of association denoting a "consists-of" hierarchy The aggregate is the parent class, the components are the children classes
Define 'engineered system'
A system which is designed and built by engineers for a specific purpose
Define 'natural system'
A system whose ultimate purpose may not be known
Define 'decomposition'
A technique used to master complexity ("divide and conquer")
Define 'event'
A type of signal to the program that something has happened. The event is generated by external user actions such as mouse movements, mouse clicks, or keystrokes.
In terms of a use case diagram, what exactly is a use case?
A use case represents a class of functionality provided by the system. Use cases can be described textually, with a focus on the event flow between actor and system.
How is complexity in Software Systems handled?
Abstraction
How are activity diagrams used in describing the context of use of a system?
Activity diagrams may be used to describe business processes in which the system is used and the other systems which are also used in these processes.
Define 'validation'
Activity of checking for deviations between the observed behavior of a system and its specification
Traditionally, when should you write a test?
After the source code is written
When does the finally block execute?
All circumstances, regardless of whether an exception occurs in the try block or is caught.
What is a checked exception?
All exceptions besides RuntimeException, Error and their subclasses are known as checked exceptions, meaning that the compiler forces the programmer to check and deal with the exceptions.
Which of the following statement(s) about PSP0 are true: a. Involves following simple process scripts b. Involves collecting 3 basic measures of their work (time spent, size of products produced, defects corrected) c. Involves performing a simple post-project analysis
All three statements are true
In terms of a use case diagram, what is an actor?
An actor represents a role, that is, a type of user of the system. An actor is a model for an external entity which interacts with the system
What is aggregation?
An aggregate is an object (the whole) composed of different parts (other objects)
What is an anonymous inner class?
An inner class without a name It combines declaring an inner class and creating an instance of the class in one step
JUnit
An open source java framework for writing and running unit tests
Define 'system'
An organized set of communicating parts
How is generalization used to simplify the models of a system with many similar objects?
Assuming that similar objects have attributes and methods in common, these common attributes and methods are associated with a "super-class" which generalizes all of the objects sharing these attributes/methods
In XP, when should you write a test?
Before the source code is written
What is class identification?
Class identification is crucial to object-oriented modeling basic assumption: 1. we can find the classes for a new software system called greenfield engineering 2. we can identify the classes in an existing system called reengineering 3. we can create a class-based interface to any system called interface engineering
What is event-driven programming?
Code is executed upon activation of events
Define 'methodologies'
Collection of techniques applied across software development and unified by a philosophical approach
What is composition?
Composition is a strong form of aggregation where the life time of the component instances is controlled by the aggregate. That is, the parts don't exist on their own. We represent this with a diamond symbol.
Defect logging in PSP involves logging what kind of information about a defect?
Defect time Phases injected and removed Fix time Description Defect type
What is a view?
Depicts selected aspects of a model
What is a sequence diagram?
Describes the dynamic behavior between objects of the system
What is an activity diagram?
Describes the dynamic behavior of a system, in particular the workflow. An activity diagram is a a special case of a state chart diagram. States are activities ("functions")
What is a use case diagram?
Describes the functional behavior of the system as seen by the user
What is a class diagram?
Describes the static structure of the system: Objects, attributes, associations
In a UML diagram, what does the edges between nodes represent?
Edges between nodes denotes a relationship
To compute monthly payment and total payment for a loan, what kind of programming is needed to accomplish the task?
Event-driven programming is needed to write the code to respond to the button-clicking event.
When a program runs into a runtime error, the program terminates abnormally. How can we handle the runtime error so that the program can continue to run or terminate gracefully?
Exception handlers
What is procedural programming?
Executed in procedural order.
What perspectives may be used for system modeling?
External, interaction, behavioral, structural perspectives
What are some of the different ways to conduct Peer Reviews?
Full reviews, Inspections, Walkthroughs
Javadoc is a documentation generator for generating API documentation in ________ format from Java source code.
HTML
What is an object?
Has a structure - attributes Must be an entity - a thing that can have properties and not be a property itself has a behavior has a unique identity generally stated as a noun
What question does a schedule answer?
How can this be done within the time limit?
What questions does a dynamic model attempt to answer?
How does the system react to external events? How is the event flow in the system?
Which of the following exceptions is a checked exception? IOException InputMismatchException RuntimeException ArithmeticException
IOException
What is reengineering?
Identifying the classes in an existing system
When is IndexOutOfBoundsException thrown?
If you access an element in an array outside the bounds of the array.
When is NullPointerException thrown?
If you access an object through a reference variable before an object is assigned to it
Define 'abstraction'
Inherent human limitation to deal with complexity. We use chunking, which is to group a collection of objects, and ignore unessential details by using models
What is inheritance?
Inheritance is another special case of an association denoting a "kind-of" hierarchy It simplifies the analysis model by introducing a taxonomy The children classes inherit the attributes and operations of the parent class
Define 'tools'
Instrument or automated systems to accomplish a technique
Black box testing
Looks at a program's inputs and outputs, nothing else
Which association do we use to model for many objects there exist many other objects?
Many-to-many association, for instance, there exists many stock exchanges for many ticker symbols
What is a state diagram?
Models the behavior of the system in response to external and internal events Shows the system's responses to stimuli so are often used for modeling real-time systems Shows the system states as nodes and events as arcs between these nodes. When an event occurs, the system moves from one state to another. State diagrams are an integral part of the UML and are used to represent state machine models.
How do we deal with errors, failures and faults?
Modular redundancy, patching and testing
What is a lambda expression?
New feature in Java 8. Can be viewed as an anonymous method with a concise syntax.
In a UML diagram, in what ways do we represent the nodes of the graph?
Nodes can be represented as either a rectangle or an oval. Rectangles denote classes or instances, and ovals denote functions
A kind of System Model that provides abstraction based on the structure of the system is called:
Object model
What are the three different types of system models?
Object models, functional models, and dynamic models
Describe three different tools we use to build task models
PERT charts, schedules and org charts
What are the three steps in PSP?
PSP0, PSP1, PSP2
What are Personal reviews in PSP?
Process of reviewing one's own code using a well-defined and structured process
What is a PERT chart?
Program Evaluation & Review Technique Chart. Describes the dependencies between the tasks
Define 'synthesis'
Put the pieces together into a large structure
Describe an 'includes' relationship
Represents functional behavior common to more than one use case. includes behavior is factored out for reuse, not because it is an exception
Describes an 'extends' relationship
Represents seldom invoked use cases or exceptional functionality. The exceptional event flows are factored out of the main event flow for clarity
Which exceptions are considered unchecked?
RuntimeException, Error and their subclasses
What is a software lifecycle?
Set of activities and their relationships to each other to support the development of a software system
What are some cons to functional decomposition?
Since the functionality is spread all over the system, the maintainer must understand the whole system to make a single change to the system. Consequence is: code is hard to understand code that is complex and impossible to maintain user interface is often awkward and non-intuitive
What is engineering?
Systematic application of scientific knowledge in creating and building cost effective solutions to practical problems
How do we achieve 100% path coverage with white box testing?
Test cases must be written for scenarios where conditions are true and false
White box testing
Testing methodology that looks under the covers and into the subsystem of an application
What is the basic assumption that underlies event-driven modeling?
That the system can be represented as a model with a finite number of discrete states and external and internal events trigger a transition from one state to another
What is a subsystem?
The parts of a system that can be considered systems in and of themselves
Why are software systems so complex?
The problem domain is difficult, the development process is very difficult to manage, and software offers extreme flexibility
What is object-oriented decomposition?
The system is decomposed into classes ("objects") Each class is a major abstraction in the application domain Classes can be decomposed into smaller classes
What is functional decomposition?
The system is decomposed into modules Each module is a major processing step (function) in the application domain Modules can be decomposed into smaller modules
Define 'erroneous state ("error")'
The system is in a state such that further processing by the system can lead to a failure
What is "part-of" hierarchy?
There is a whole and is being broken up into parts
Define 'analysis'
To understand the nature of a problem and break the problem into pieces
Javadoc comments begin with a special marker /**. True or false?
True
What is UML?
Unified Modeling Language A nonproprietary standard for modeling software systems
What questions does a functional model attempt to answer?
What are the functions of the system? How is the data flowing through the system?
What question does an org chart answer?
What are the roles in the project or organization?
What questions does an object model attempt to answer?
What is the structure of the system? What are the objects and how are they related?
What questions does an issues model attempt to answer?
What the open and closed issues? What constraints were posed by the client? What resolutions were made?
How do we test the dynamic model?
White-box testing
When should a try-catch block be used in your code?
You should use it to deal with unexpected error conditions. Do not use it to deal with simple, expected situations.
What is object-oriented methodology?
a development approach that organized a system as a collection of objects containing both data and behavior
All exception classes inherit, either directly or indirectly, from: a. class Throwable. b. class RuntimeException. c. class Error. d. None of the above.
a. class Throwable.
Choose the most appropriate generic software process model that might be used as a basis for managing the development of the following system: "A university accounting system that replaces an existing system" a. V-Shaped Model b. Waterfall model c. Spiral model d. Rapid Application Development (RAD) Model
b. Waterfall model
What is the normal order of activities in which traditional software testing is organized? a. integration testing b. system testing c. unit testing d. acceptance testing
c, a, b, d unit testing, integration testing, system testing, acceptance testing
Which of the following is a valid javadoc comment? a. //** Hello! **/ b. /** Hello! **/ c. /** Hello! */ d. /* * * Hello! * */
c. /** Hello! */
Choose the most appropriate generic software process model that might be used as a basis for managing the development of the following system: "An interactive travel planning system that helps users plan journeys with the lowest environmental impact" a. Waterfall model b. V-shaped model c. Incremental model d. Rapid Application Development (RAD) model
c. Incremental Model
What is a fault or bug? a. Deviation of observed behavior from specified behavior b. System is in a state such that further processing by the system can lead to a failure c. Mechanical or algorithmic cause of an error d. Process of checking for deviations between observed behavior of a system and its specification
c. Mechanical or algorithmic cause of an error
If the catch-or-declare requirement for a checked exception is not satisfied: a. the compiler will issue an error message indicating that the exception must be caught. b. a stack trace will be displayed indicating the exception that has occurred and where it occurred. c. the compiler will issue an error message indicating that the exception must be caught or declared. d. a stack trace will be displayed, along with a message indicating that the exception must be caught.
c. the compiler will issue an error message indicating that the exception must be caught or declared.
Which of the following statements is false? a. Custom exception classes can be created if the predefined classes are not sufficient. b. Exception handling enables programmers to write robust and fault-tolerant programs. c. Exception handling can resolve exceptions. d. Exception handling can catch but not resolve exceptions.
d. Exception handling can catch but not resolve exceptions.
Which of the following is not included in an exception's stack trace? a. The method-call stack at the time the exception occurred. b. A descriptive message for the exception. c. The name of the exception. d. Instructions on handling the exception.
d. Instructions on handling the exception.
What is Validation (in testing terminology)? a. Deviation of observed behavior from specified behavior b. System is in a state such that further processing by the system can lead to a failure c. Mechanical or algorithmic cause of an error d. Process of checking for deviations between observed behavior of a system and its specification
d. Process of checking for deviations between observed behavior of a system and its specification
An uncaught exception: a. is another term for a thrown exception. b. is a possible exception that never actually occurs during the execution of the program. c. is an exception that occurs for which the matching catch clause is empty. d. is an exception that occurs for which there are no matching catch clauses.
d. is an exception that occurs for which there are no matching catch clauses.
The throws clause of a method: a. specifies the exceptions a method catches. b. specifies the exceptions thrown by the calling method. c. specifies the exceptions a method throws and catches. d. specifies the exceptions a method throws.
d. specifies the exceptions a method throws.
When an exception occurs it is said to have been: a.handled b. declared c. caught d. thrown
d. thrown
To catch an exception, the code that might throw the exception must be enclosed in a a. throws block. b. catch block. c. finally block. d. try block.
d. try block.
Define 'techniques (method)'
formal procedures for producing results using some well-defined notation
What is a methodology?
process for organized production of systems/software using a collection of pre-defined techniques and notational conventions
Define 'fault ("bug" or "defect")'
− The mechanical or algorithmic cause of an error