Posts

Showing posts from February, 2016

What do Biff Brannon and his wife, Alice, argue about when they are first introduced to the story?

What do Biff Brannon and his wife, Alice, argue about when they are first introduced to the story? Biff Brannon and Alice argue about a strange man named Jake Blount, who has charged up a large bill at their restaurant and has been getting disruptive with his drunkenness.

Where does Antonapoulos's cousin, Charles Parker, take him after he gets into more trouble?

Where does Antonapoulos's cousin, Charles Parker, take him after he gets into more trouble? Charles Parker arranges for Antonapoulos to be admitted to an insane asylum.

What does John Singer do when Antonapoulos started getting into trouble?

What does John Singer do when Antonapoulos started getting into trouble? Whenever Antonapoulos gets into trouble Singer tries to help him, even bailing him out of jail until he has no more money to do that.

What three things does Antonapoulos like to do most?

What three things does Antonapoulos like to do most? Antonapoulos likes to drink and a certain solitary, secret pleasure; but most of all he likes to eat.

What do Spiros Antonapoulos and John Singer have in common?

What do Spiros Antonapoulos and John Singer have in common? Spiros Antonapoulos and John Singer are both deaf and mute and have lived together for ten years.

List 3 of the fundamental software engineering concepts identified by Wasserman.

List 3 of the fundamental software engineering concepts identified by Wasserman. Answer: Abstraction Reuse Metrics

List the top 3 reasons of failure for cancelled projects uncovered by the Chaos report

List the top 3 reasons of failure for cancelled projects uncovered by the Chaos report  Answer: Incomplete requirements; lack of user involvement; lack of resources.

List 3 of or more of Royce’s top ten principles for modern software management.

List 3 of or more of Royce’s top ten principles for modern software management. Answer: Change management should be established Use model-based and machine processable notation to capture design Plan to have incremental releases Establish a configurable process

List at least 3 of Davis’s software engineering principles discussed in the book.

List at least 3 of Davis’s software engineering principles discussed in the book. Answer: Evaluate design alternatives Use different languages for different phases Put technique before tools Inspect code

List the 3 basic management strategies recommend by the GAO (General Accounting Practices) as key to ensuring the delivery of high quality software on time and within budget.

List the 3 basic management strategies recommend by the GAO (General Accounting Practices) as key to ensuring the delivery of high quality software on time and within budget. Answer: Focused attention on the software development environment; Disciplined development process; Methodical use of metrics to gauge cost, schedule and performance targets.

List at least 3 of the 8 principles for ethics and professional practices in software engineering recommended by the ACM code of ethics.

List at least 3 of the 8 principles for ethics and professional practices in software engineering recommended by the ACM code of ethics. Answer: Act consistent with the public interest. Maintain integrity and independence. Advance the integrity and reputation of the profession. Act in the best interests of their client and the employer consistent with the public interest.

List the four most important reasons for project success uncovered by the Chaos report

List the four most important reasons for project success uncovered by the Chaos report Answer: User involvement, executive management support, clear requirement statements, proper planning.

Define the depth versus the breadth issue in software complexity.

Define the depth versus the breadth issue in software complexity. Answer: The breadth of software complexity usually refers to “the number of” functionality, components, interfaces, etc. of the software while the depth of the software complexity refers to the “relations and interactions” among these functions, components, etc.

The following are five factors that should be considered in deciding how many post-release support personnel will be needed.

The following are five factors that should be considered in deciding how many post-release support personnel will be needed. Answer: i) how many customers/users are expected; ii) the quality of the product at release time in terms of known bugs that are still in the product; iii) amount of user training that was provided before release; iv) projected number of problems and changes that may be arriving, and v) how well trained are the support personnel.

The following are the three main areas that need to be coordinated in large software projects:

The following are the three main areas that need to be coordinated in large software projects: Answer: a) the process, b) the product, and c) the people. The size, complexity, and schedule of the product dictate the process. The product and process also dictate the type and number of people needed.

What is software integration and why is this important in large software construction?

What is software integration and why is this important in large software construction? Answer: A large software project is usually simplified via decomposition and the different parts are assigned to different people. As the parts are completed they have to be brought together and execute as one major function. The steps and tasks involved in bringing the parts together, such as joint compilation and build, is called software integration.

Why is a development process needed?

Why is a development process needed? Answer: When there is a large number of people involved in a project, a development process is necessary to help guide and coordinate their activities.

Differentiate “vertical” application software versus “horizontal” software application.

Differentiate “vertical” application software versus “horizontal” software application. Answer: The horizontal software refers to the common services such as UI interface, DB interface, or error messaging. The vertical application is a specific application such as claims processing or inventory update.

List some, at least two, technical concerns in developing large systems.

List some, at least two, technical concerns in developing large systems. Answer: Large system requires software engineers to consider many aspects of development, including a) architecture and design decomposition, b) choices of language, database, network, middleware, and c) the process and methodologies to be used for development.

The following are two non-technical concern in developing large systems.

The following are two non-technical concern in developing large systems. Answer: Estimation and planning of the project AND the people management aspect of the large project, especially ensuring that the communication among people are facilitated and taking place.

Describe some, at least one, way to simplify a complex problem.

Describe some, at least one, way to simplify a complex problem. Answer: A common attribute among the methodologies of simplification is to “lessen” the relationships, number of functionalities, amount of interactions, etc. One such technique is decomposition, and another is modularization.

List kinds of design constraints imposed in most systems (and, in particular, in the system described in chapter 1). Answer: User Interface, Input sizes, platforms, schedule requirements

List kinds of design constraints imposed in most systems (and, in particular, in the system described in chapter 1). Answer: User Interface, Input sizes, platforms, schedule requirements

List kinds of non-functional requirements found in most systems (and, in particular, in the system described in chapter 1).

List kinds of non-functional requirements found in most systems (and, in particular, in the system described in chapter 1). Answer: Performance, Real-Time Requirements, modifiability

What is the difference between functional and non-functional requirements ?

What is the difference between functional and non-functional requirements ? Answer: Functional requirements specify what a program needs to do, whereas non-functional requirements specify how are the functional requirements to be achieved.

What is the value assigned to the variable in each of these cases? Explain curious results. Be careful!

What is the value assigned to the variable in each of these cases? Explain curious results. Be careful! int x, y; a) x = 1/2; b) y = 3.0/2.0; double z, w, t; c) z = 1/2; d) w = 3/2; e) t = 3.0/2.0; Answer: a) 0 is assigned.1/2 is computed using truncating integer divide which gives 0. b) 1.5 is calculated and assigned. The fractional part is discarded; 1 is stored. c) 0 is calculated because 1/2 is done with truncating integer divide, gives 0. The floating point value 0.0 is stored. d) 1 is calculated, because truncating int divide, 1.0 is stored e) 1.5 is calculated and stored.

When you use a double, what is doubled? When you use a long int, how much longer is the long int than an int? Comment.

When you use a double, what is doubled? When you use a long int, how much longer is the long int than an int? Comment. Answer: In a double, the precision part of the value is about twice the precision of a float. The size of the exponent is also increased. In most implementations, long is the same size as int.

Write a short program that contains statements to output the values of a variable that you define but neither initialize nor assign. Discuss the output you get.

Write a short program that contains statements to output the values of a variable that you define but neither initialize nor assign. Discuss the output you get.  Answer: #include <iostream> using namespace std; int main() {   int uninitialized;   cout << uninitialized << endl;   return 0; }

Give the declaration for two variables, feet and inches. Declare each to be of type int, and both initialized to zero in the declaration. Give both initialization alternatives.

Give the declaration for two variables, feet and inches. Declare each to be of type int, and both initialized to zero in the declaration. Give both initialization alternatives. Answer: int feet = 0; int inches = 0; //Alternate initialization. int feet (0); int inches(0);

What is the difference between a warning from the compiler and an error message from the compiler?

 What is the difference between a warning from the compiler and an error message from the compiler? Answer: An error message usually causes code generation to stop. A warning does not. Unless you understand what the warning is all about you should not ignore warnings.

What does the line #include do for your program?

What does the line #include <iostream> do for your program? Answer: The #include directive provides declarations and definitions of the iostream components so that your program can use them in a way that allows the system linker to connect your program to the corresponding library.

Given the C++ output statements. What is the output of these lines of code? Explain.

Given the C++ output statements. What is the output of these lines of code? Explain.  cout << "If you have "; cout << "a number of pods "; cout << "you can quit."; cout << "\n"; Answer: If you have a number of pods you can quit. Explanation: Note that there is a <cr> emitted by the code, which puts the next output position on the next line at the left end.

Write a C++ program that outputs "My first C++ program" and then outputs a carriage return.

Write a C++ program that outputs "My first C++ program" and then outputs a carriage return. Answer: #include <iostream> using namespace std; int main() {   cout << “My first C++ program” << endl; } Explanation: An alternative is to place using namespace std; after the #include directive, or to place this inside the block of the function main. This depends on the local rules for placing namespace directives and definitions.

In the history of the C++ language, what was the immediate predecessor of the C++ language? How is this older language related to C++?

In the history of the C++ language, what was the immediate predecessor of the C++ language? How is this older language related to C++? Answer: The immediate predecessor of C++ is the C programming language. C is very nearly a proper subset of C++.

Assume that two products are being produced: benches and chairs. Create a table that illustrates constant opportunity costs in the production of these two goods. Draw a production possibilities frontier (PPF) based on the data in your table and explain the condition necessary for a PPF to exhibit constant opportunity costs.

Assume that two products are being produced: benches and chairs.  Create a table that illustrates constant opportunity costs in the production of these two goods.  Draw a production possibilities frontier (PPF) based on the data in your table and explain the condition necessary for a PPF to exhibit constant opportunity costs. ANS: The following table illustrates constant opportunity costs: Benches Chairs 0 160 10 120 20 80 30 40 40 0 The PPF associated with this table would be a downward-sloping straight line with one axis labeled “Benches” and the other axis labeled “Chairs”.  The opportunity cost in this example is a constant rate of 4 chairs forfeited for every one bench produced.  In order for a PPF to exhibit constant opportunity costs, the resources used to produce the products must be equally well-suited to the production of both products.

Explain how a technological advancement in one sector of the economy can lead to a change in the number of people who work in another sector of the economy. Give an example to help support your answer.

Explain how a technological advancement in one sector of the economy can lead to a change in the number of people who work in another sector of the economy.  Give an example to help support your answer. ANS: A technological advancement in one sector of the economy can lead to fewer people being needed to produce the goods in that sector.  This will release people from that sector and allow them to take jobs in other sectors of the economy.  This is what happened in the farming industry during the 20th century.  As more and more farming tasks that had once been performed by people were being performed by machinery and computers, the former farmers were then free to find jobs in fields such as manufacturing and service industries.

Explain what productive efficiency means. Describe how productive efficiency is represented by a PPF.

Explain what productive efficiency means.  Describe how productive efficiency is represented by a PPF. ANS: An economy is producing efficiently if it is producing the maximum amount of output with a set amount of resources and technology. Efficiency is represented by all of the points that lie along the PPF.

Using your own words, describe the law of increasing opportunity costs. Be sure to explain why this phenomenon occurs and how it helps to contribute to the shape of the production possibilities frontier.

Using your own words, describe the law of increasing opportunity costs.  Be sure to explain why this phenomenon occurs and how it helps to contribute to the shape of the production possibilities frontier. ANS: People (and other resources) have varying abilities when it comes to producing a given product which results in a non-constant opportunity cost. Those resources that are better suited at making the product will have a lower opportunity cost than those who are less-suited.  As more of a product is produced, it becomes increasingly more difficult to find resources that are well-suited to producing that product.  Therefore, the opportunity cost of producing more units grows as additional units are produced. and the PPF becomes steeper and steeper.  The result is that the PPF is typically bowed-outward due to the law of increasing opportunity costs.

Why is the production possibilities frontier (PPF) typically bowed-outward? Under what circumstances would the PPF be a straight line?

Why is the production possibilities frontier (PPF) typically bowed-outward? Under what circumstances would the PPF be a straight line? ANS: The PPF is typically bowed-outward due to the law of increasing opportunity costs. As more of a product is produced, it becomes increasingly more difficult to find resources that are well-suited to producing that product. Therefore, the opportunity cost of producing more units grows and the PPF becomes steeper and steeper. The PPF is a straight line when the resources used to produce the two products are perfectly interchangeable, and thus the opportunity cost of producing more units is constant.

Give a definition of an advance in technology. Suppose that you are drawing a PPF for civilian goods and military goods, describe the effect on the PPF of an advance in technology in both civilian goods and military goods. How would the impact on the PPF be different if the technological improvement only helped in the production of military goods, but not civilian goods?

Give a definition of an advance in technology. Suppose that you are drawing a PPF for civilian goods and military goods, describe the effect on the PPF of an advance in technology in both civilian goods and military goods.  How would the impact on the PPF be different if the technological improvement only helped in the production of military goods, but not civilian goods? ANS: An advance in technology commonly refers to the ability to produce more output with a fixed amount of resources (or the same amount of output with a smaller amount of resources). When technology advances in the production of both products the PPF shifts outward.  When technology advances in the production of military goods, but not civilian goods, the PPF shifts outward along the axis for military goods and the intercept remains constant along the axis for civilian goods.

Write code that will take three Integer values, in1, in2 and in3, compute their average and store the average in a new Integer av. Remember that Integer is a wrapper class (an object), and is not the same as int. To obtain the int value stored in an Integer, use intValue( ).

Write code that will take three Integer values, in1, in2 and in3, compute their average and store the average in a new Integer av.  Remember that Integer is a wrapper class (an object), and is not the same as int.  To obtain the int value stored in an Integer, use intValue( ). Answer:               int average = (in1.intValue( ) + in2.intValue( ) + in3.inValue( )) / 3;               Integer av = new Integer(average

Define an interface class that contains two int constants, X = 5 and Y = 10 and one int method called useXY which receives no parameters. Call your interface class XYClass

Define an interface class that contains two int constants, X = 5 and Y = 10 and one int method called useXY which receives no parameters.  Call your interface class XYClass Answer:               public interface XYClass               {                             public final int X = 5;                             public final int Y = 10;                             public int useXY( );               }

Explain or provide an example showing how each of the following Exceptions could arise. a) ArithmeticException b) NullPointerException c) NumberFormatException d) IndexOutOfBoundsException

Explain or provide an example showing how each of the following Exceptions could arise. a)       ArithmeticException b)       NullPointerException c)       NumberFormatException d)       IndexOutOfBoundsException Answer: a)       An arithmetic operation could not take place because of an illegal action such as division by zero or square root of a negative number b)       An object was not instantiated (it had the value null) before a message was passed to it c)       An expected value for a numeric operation was not a legal number, such as trying to parse a String value to create an equivalent int where the String contains a non-digit character d)       A numeric parameter used as an index into an object such as an array, String or Vector was out of range, such as charAt(-1)

Assume a class Foo implements Comparable. Without knowing anything else about the Foo class, write an equal method that returns true if the Foo parameter passed to this Foo is equal to this Foo as determined by using the implementation of Comparable.

Assume a class Foo implements Comparable.  Without knowing anything else about the Foo class, write an equal method that returns true if the Foo parameter passed to this Foo is equal to this Foo as determined by using the implementation of Comparable. Answer:                             public boolean equals(Foo a)                             {                                           if(compareTo(a)) = = 0) return true; else return false;

Provide a reason why a method would be declared static.

Provide a reason why a method would be declared static. Answer:  A method is declared static if it might be used, not by the current object, but by any objects of the class.  That is, the method does not require access to any single object’s instance data.  Consider a class called Point that consists of an x and y coordinate.  To determine the distance between two Points, we could make a static computeDistance method.  It is passed two Points as parameters and computes the distance.  Another example is the Keyboard class from the textbook, which does not itself have any instance data.

Provide a reason why an instance data would be declared static.

Provide a reason why an instance data would be declared static.  Answer:  If an instance data is to be shared among all objects of the class, the instance data would be static.  As an example, an instance data that counts the number of times something has happened across all objects of the class would be made static.  If we are writing a chess game and have a ChessPiece class that includes a method called movePiece, we would want to know how many moves a player has made, but not necessarily how many times a single piece has been moved.  So, all of the ChessPieces share a numberOfTimesMoved instance data that is incremented by any ChessPiece whenever it is moved.

Consider the condition (x = = y). How is this handled if x and y are primitive types? How is this handled if x and y are objects?

Consider the condition (x = = y).  How is this handled if x and y are primitive types?  How is this handled if x and y are objects? Answer:  If x and y are primitive types, then the values stored in x and y are compared and true is returned if the two values are equal.  If x and y are objects, then the object that x and y reference are compared.  If they are the same object, it returns true, otherwise it returns false.

Explain what a NullPointerException is and how it can arise.

Explain what a NullPointerException is and how it can arise. Answer:  A NullPointerException is an exception that indicates that an operation was attempted on some object that is equal to null.  For instance, ChessPiece c; declares c to refer to a ChessPiece, but c has not yet been instantiated, so any message passed to c at this point will cause a NullPointerException.

Explain why aliases can cause trouble for programmers who are not aware of them.

Explain why aliases can cause trouble for programmers who are not aware of them. Answer:  Aliases arise in Java when variables refer to the same object.  If one of those variables is used to pass a message to the object in such a way that the object is changed, then the other variables now refer to a changed object.  Unless the programmer is careful, he/she may not realize that a change has been made to the object.  Consider a class Foo that has an instance data x and a method incr that adds one to x.  Assume a and b are both of type Foo, where a’s x is 10.  Consider the following two instructions:  b = a;  b.incr( );  The result is that a/b’s value x is now 11, but if the programmer is not aware of the aliasing, then he/she might expect a’s x to still be 10.