Adsterra.com

Sunday, 23 July 2017

Now that we have dealt with our technical debt, we can begin to write code in earnest. Hub Travel has requested that a graphic be added to their program that shows the flight path between the selecte

Visual Basic

Now that we have dealt with our technical debt, we can begin to write code in earnest. Hub Travel has requested that a graphic be added to their program that shows the flight path between the selected airport hubs. They also would like to use the entire database of hubs instead of the small test set we have been using. They have provided a more accurate formula for calculating distance between points on a sphere, a formula for calculating the midpoint of the flight curve since the flight path will not necessarily be a straight line, and a formula for calculating the xy coordinates on the US Map (Form 2) that correspond to the latitude and longitude. That last calculation is not as straight forward as it would at first appear. On a Mercator projection map, the latitudes appear to be curved and the longitudes are closer together at the top of the map than they are at the bottom. For those tasks in this sprint that involve adding new functions, you will need to add a unit test as well.

This last sprint is an attempt to simulate an actual scrum. There are more than four tasks, which means some of you will have to do more than one task if you want to complete the entire backlog. Many of the tasks require a test unit as well as a new function; this is how Agile programming is normally done. Different tasks require different skills; select your tasks based on your ability as well as your preferences. If you have trouble with any of your tasks, be sure to ask the scrum master for help. After all, that is the scrum master’s main function.

Story:    As a pc user I want a distance calculator program that allows me to select any two US airport hubs, and not only calculates the distance between them, but also shows the route on a map.
Task 1: Read airport hub information from the hubs database provided (hubs.mdb) instead of from the assignment statements in the LoadArray subroutine.
Task 1a: Rewrite the LoadData subroutine to bind to the hubs.mdb database.
Task 1b:  Modify the hubs array to hold 16 items. Rewrite the LoadData subroutine to fill the hubs array with data from the hubs.mdb dataset. (The Prototype for The Unbound Dataset should be helpful.)
Task 1c:  Run the unit tests to make sure they all run.
Task 1d: Check out the master copy of the project and install your changes.


Task 2:  Create a function named RadiansToDegrees that transforms decimal degrees into radians. This is the inverse function of DegreesToRadians.
Task 2a:    Write the code for the function RadiansToDegrees with input parameter RadiansDouble as type Double, and a return value of type Double representing the angle in degrees.
Task 2b:    Right click anywhere within theRadiansToDegrees function in Airports.vb and add a unit test to the unit test framework. Modify the code to set RadiansDouble to 0.58712 and expected to 33.63949. Set delta in the Assert.AreEqual call to 0.00001 to allow for rounding error.
Task 2c:    Run the unit tests to make sure they all run.
Task 2d:    Check out the master copy of the project and install your changes.

Task 3:  Create a function named IndexToCoordinatePair that calculates the decimal coordinates as Coordinates (structure already defined) given the latitude and longitude of the hub airport indicated by index.

Task 3a:    Write the code for the function IndexToCoordinatePair with input parameter index as type Integer, and a return value of type Coordinates. Use the function CoordinateToDegrees to convert the individual coordinates as strings into components of the returned value as type Coordinates (a pair of type Double).
Task 3b:    Right click anywhere within the IndexToCoordinatePair function in Airports.vb and add a unit test to the unit test framework. Add the line, target.LoadData(), to IndexToCoordinatePairTest immediately after the Dim statements. Modify the code to set index = 0, expected.lat = 33.63944 and expected.lon = 84.42806. You will need to test each component of the actual value separately.  Set delta in each Assert.AreEqual call to 0.00001 to allow for rounding error.
Task 3c:    Run the unit tests to make sure they all run.
Task 3d:    Check out the master copy of the project and install your changes.


Task 4:                  Create a function named CoordinatePairToCartesianPair that transforms latitude/longitude coordinates in decimal degrees (a pair of type Double) into an xy point in pixels (a pair of type Integer).
Task 4a:    Create the function CoordinatePairToCartesianPair and add the following comment:
‘        Formula for transforming coordinates into screen positions
‘        Transform equations determined using SPSS Stepwise Regression
‘        x = int( -18.886 × lon - 17.777 × lat + 0.178 × lat × lon + 2173.268 )
‘        y = int( -15.183 × lat + 14.772 × lon - 0.073 × lon² + 48.703 )


Write the code for this function with input parameter CoordPair as type Coordinates , and a return value of type Point.
Task 4b:    Right click anywhere within the CoordinatePairToCartesianPair function in Airports.vb and add a unit test to the unit test framework. Modify the code to set CoordPair.Lat = 33.63944, CoordPair.Lon=84.42806, expected.X = 486, and expected.Y=265. You may want to test each component of the actual value separately, but you don’t need to since a delta isn’t required.
Task 4c:    Run the unit tests to make sure they all run.
Task 4d:    Check out the master copy of the project and install your changes.

Task 5:                  Modify the Distance function to use the Haversine method instead of the Spherical Law of Cosines.
Task 2a:    Add the following comment to the Distance function:
‘        Haversine Formula for the distance between two points on a sphere.
‘        R.W. Sinnott, "Virtues of the Haversine", Sky and Telescope, 68(2):159, 1984.
‘        R = earth’s radius (mean radius = 6,371km = 3958.761mi)
‘        Δlat = lat2 - lat1
‘        Δlong = long2 - long1
‘        a = sin²(Δlat/2) + cos(lat1) × cos(lat2) × sin²(Δlong/2)
‘        c = 2 × atan2(√a, √(1 - a))
‘        d = R × c
‘        (Note that angles need to be in radians to pass to trig functions).
Task 5b:    Use this new code to replace the existing code for calculating the distance in miles between two points on the earth. Modify the code that extracts the latitude and longitude for the two hub airports indicated by index1 and index2, to use the IndexToCoordinatePair function instead. Modify the code that converts degrees to radians using DegreesToRadians to use components of the two coordinate pairs.
Task 5c:    Run the unit tests to make sure they all run.
Task 5d:    Check out the master copy of the project and install your changes.

Task 6:                  Create a function named MidCoordinatePair that calculates the midpoint between two points on a sphere. This task requires the prior completion of Tasks 2 and 3.
Task 6a:    Create a function MidCoordinatePair and add the following comment:
‘        Formula for the midpoint between two points on a sphere
‘        Ed Williams, “Aviation Formulary V1.46”
‘        at williams.best.vwh.net/avform.htm
‘        Bx = cos(lat2) ∙ cos(Δlong)
‘        By = cos(lat2) ∙ sin(Δlong)
‘        latm = atan2(sin(lat1) + sin(lat2), √((cos(lat1) + Bx)² + By²))
‘        lonm = lon1 + atan2(By, cos(lat1) + Bx)
‘        (Note that angles need to be in radians to pass to trig functions).

Write the code for this function with input parameters index1 and index2 as type Integer, and a return value of type Coordinates. Use the function IndexToCoordinatePair to return the coordinates from the Hubs array for index1 and index2 and the function DegreesToRadians to convert the individual components of the two Coordinate pairs to Radians in order to do the calculation. After the calculation is complete, call the function RadiansToDegrees to convert the latitude and longitude back to degrees before returning the coordinate pair.
Task6b:     Right click anywhere within the MidCoordinatePair function in Airports.vb and add a unit test to the unit test framework. Add the line, target.LoadData(), to MidCoordinatePairTest immediately after the Dim statements.  Modify the code to set
index1 = 0, index2 = 1, expected.lat = 38.19098, and expected.lon=78.12139. You will need to test each component of the actual value separately.  Set delta in each Assert.AreEqual call to 0.00001 to allow for rounding error.
Task 6c:    Run the unit tests to make sure they all run.
Task 6d:    Check out the master copy of the project and install your changes.



Task 7: Create a subroutine named Plot that plots a curved line on the US Map Form representing the shortest distance between two airport hubs.
Task7a:     Create a subroutine Plot and write code that plots a curved line on the US Map Form (Map) using the DrawCurve method of the CreateGraphics library. This will require the parameters Pen.Black and an array of points containing the xy coordinates of the starting point, midpoint, and ending point of the curve.  No value for the third parameter, tension, is necessary.
Task7b:     In the same subroutine use the DrawRectangle method of the CreateGraphics library to draw small squares at the starting and ending points.
Task 7c:    Run the unit tests to make sure they all run.
Task 7d:    Check out the master copy of the project and install your changes.

Task 8: Add a button to the form Airports that plots a curved line on the US Map Form representing the shortest distance between two airport hubs. This task requires the prior completion of Task 7.
Task8a:     Create a button on the form Airports named ShowMapButton. Change the text property to “Show Map”.
Task8b:     In the event handler of the Click event for ShowMapButton, add code to build an array of points named XYPairs of type point that contains xy values for the starting point, midpoint, and ending point of the curve to be plotted on the US Map Form (Map). Be sure to Show Map before calling the subroutine Plot.
Task 8c:    Run the unit tests to make sure they all run.
Task 8d:    Check out the master copy of the project and install your changes.

Task 9: Do a final check and publish results in the Weekly Discussion Board.
Task 9a:    Run the unit tests to make sure they all pass.
Task 9b:    On Friday of Week 6, after all team members have made their changes to the master copy, insert a copy of AirportDistances.exe in the Weekly Discussion Board for your team.



 CLICK HERE TO GET THE ANSWER !!!!

Friday, 24 February 2017

The Fashion Shoe Company operates a chain of women’s shoe shops that carry many styles of shoes that are all sold at the same price.

The Fashion Shoe Company operates a chain of women’s shoe shops that carry many styles of shoes that are all sold at the same price. Sales personnel in the shops are paid a substantial commission on each pair of shoes sold (in addition to a small base salary) in order to encourage them to be aggressive in their sales efforts.

     The following worksheet contains cost and revenue data for Shop 48 and is typical of the company’s many outlets:


      Per Pair of
Shoes
  Selling price     $     40.00    
     
Variable expenses:                
     Invoice cost     $     19.50    
     Sales commission           4.50    
     


  Total variable expenses     $     24.00    
     


    Annual    
  Fixed expenses:                
     Advertising     $     38,000    
     Rent           28,000    
     Salaries           140,000    
     

 Total fixed expenses     $     206,000    
     


   Required:
1.     Calculate the annual break-even point in unit sales and in dollar sales for Shop 48.

Add caption


Explanation:

Wednesday, 15 February 2017

Sereno Company makes piñatas for children’s birthday parties. Information for Sereno’s last six months of operation is listed below.



Sereno Company makes piñatas for children’s birthday parties. Information for Sereno’s last six months of operation is listed below.



Required:
Prepare the journal entries to record each of the following transactions. (If no entry is required for a transaction/event, select "No Journal Entry Required" in the first account field.)

(a) Purchased $9,000 of raw materials on credit.
(b) Issued $4,000 of direct materials into production.
(c) Recorded $15,000 in direct labor.
(d) Applied $17,200 in manufacturing overhead.
(e) Completed pinatas costing $20,650.
(f) Recorded $19,900 in actual manufacturing overhead.
(g) Sold piñatas for $34,300 that cost $17,600 to produce (assume that Sereno Company uses a perpetual inventory system).

save image

Friday, 10 February 2017

The word that is central to the definition of economics is ________.



The word that is central to the definition of economics is ________.  scarcity correct
Explanation:
In this chapter’s first section, “Economics Defined,” you’ll see that the word, scarcity, is central to the definition of economics. See also the second section, “The Central Fact of Economics: Scarcity.”

Human wants are ________. relatively unlimited correct
 
Explanation:
In the chapter’s first section, we see that a part of the definition of economics is the satisfaction of human wants, which are relatively unlimited.

The opportunity cost of spending four hours studying a review book the night before a final exam would be ________. missing four hours of TV correct
Explanation:
In the section in the text on opportunity cost, we define it as the forgone value of the next best alternative.

An economy operating its plant and equipment at full capacity implies a capacity utilization rate of ________. 85 percent correct
 Explanation:
At the beginning of the section, “Full Employment and Full Production,” we state that utilizing 85 or 90 percent of our plant and equipment would employ virtually all of our usable productive capacity.

The full-production level of our economy implies ________.  an efficient allocation of our resources correct
 Explanation:
In the section, “Full Employment and Full Production,” we state that “By full production we mean that our nation’s resources are being allocated in the most efficient manner possible.”

The production possibilities curve represents ________.  our economy at full production and full employment correct
 Explanation:
In the section, “Productive Efficiency,” we state that only on the production possibilities curve can we attain productive efficiency. This is attained when the maximum possible output of any one good is produced, given the output of other goods.

If we are operating inside our production possibilities curve ________.  there is definitely less than full employment correct
 Explanation:
If our economy is operating on its production possibilities curve, we are at full employment. Therefore, if we are operating inside the curve, there is definitely less than full employment.

The closer we are to the origin and farther away we are from the production possibilities curve ________. the more unemployment there is correct
Explanation:
At the origin, we have an unemployment rate of 100%. So as we approach the origin, the more unemployment there is.

Economic growth will occur if any of the following occur except ________. the level of consumption rises and the savings rate falls correct
 Explanation:
If consumption rises and savings falls, less money will be available for investment in new plant, equipment, and technology. These key elements of economic growth would have less scarce resources to utilize.

To attain a higher rate of economic growth, we need to devote ________. a higher proportion of our production to capital goods and a lower proportion to consumer goods correct
 Explanation:
For an economy to grow, it needs to devote a high proportion of its resources to the production of capital goods like plant and equipment.

Employment discrimination is most closely related to ________. underemployment correct
 Explanation:
Employment discrimination results in underemployment because we are not using people in our labor force at their highest skill level. Many examples are given in the section, “Full Employment and Full Production.”

Which statement is true? Our economic problem is that we have limited resources available to satisfy relatively unlimited wants. correct
Explanation:
This choice is discussed in the section of the text titled “Economics Defined.”

Suppose you had $1,000 to spend. If you spent it on a vacation trip rather than on new clothes, your second choice, or 1,000 lottery tickets, your third choice, what was your opportunity cost of going on a vacation trip?  not buying the new clothes correct
 
Explanation:
Because buying new clothes is your second best alternative, it is, by definition, your opportunity cost.

As we produce increasing amounts of a particular good, the resources used in its production ________. become less suitable correct
 Explanation:
As we produce more and more of a good, we are forced to use resources that are less and less suitable. We choose the best suited and most productive resources first, and then, to further increase output, we need to use whatever resources are available.

The law of increasing costs is explained by each of the following except ________. overspecialization correct
 Explanation:
Overspecialization is not an explanation. The factors listed in the other choices are discussed in the Advanced Work Box: “The Law of Increasing Returns.”

As a firm grows larger, ________. economies of scale set in, then diseconomies of scale correct
 
Explanation:
Economies of scale and diseconomies of scale are described in the Advanced Work Box: “The Law of Increasing Returns.” As a firm expands, it takes advantage of economies of scale such as securing quantity discounts and spreading the cost of expensive and productive machinery over larger amounts of output. But as the firm continues to grow, diseconomies of scale begin to set in such as bloated bureaucracies, using less suitable resources, and incurring rising resource costs.


If the following figure shows our production possibilities frontier during the Great Depression, at which point were we operating?

 point B correct

Explanation:
During the depths of the Great Depression about 25 percent of our labor force was officially unemployed, and perhaps another 10 percent had just given up looking for work. Point A represents an unemployment rate of 100 percent, and point C, an unemployment rate of 5 percent. So point B would be where we were during the Great Depression.

Which statement is true? As our economy recovers from a recession, it moves closer to its production possibilities curve. correct
 Explanation:
During a recession, we’re some distance inside the production possibilities curve. As we recover, we move closer to the curve.


Refer to the figure below.


If we were at point C, could we quickly produce substantially more houses and more cars?

No correct

Explanation:
Point C is on the production possibilities frontier which indicates that the economy is currently operating at full capacity, which precludes producing more of both goods in the near term.


Refer to the graph below.


If we were at point M in the figure provided, could we quickly produce substantially more houses and more cars?

Yes correct

Explanation:
Point M is below the production possibilities frontier which indicates that the economy is currently below capacity, meaning producing more of both goods in the near term should be feasible.

Refer to the graph below.


If we were at point C in the figure provided, could we quickly go to point J?

No correct

 
Explanation:
Point J is above the production possibilities frontier which indicates that it is currently above the economy's capacity to produce.  Economic growth may make it feasible to achieve at some point in the future, but that would most likely take years rather than months.


Refer to the graph below.


Associate each point on the graph provided with an appropriate description of economic conditions.

Point X: a catastropic depression correct
Point Y: a serious recession correct
Point Z: where our economy generally operates correct
Point W: economic growth correct

Explanation:
The position of the PPF indicates the current capacity of the economy.  Any individual point above the PPF requires a period of economic growth.  Points below the PPF represents varying amounts of unemployment depending on how far below the curve the point is located.

Fill in a new productions possibilities frontier representing substantial economic growth.


Instructions: On the graph above, use the tool provided, PPF2 , to fill in a new production possibilities frontier line showing substantial growth.

 
Explanation:
Substantial economic growth of a nation is exhibited by a sizable rightward shift of the production possibilities frontier.


On the graph provided, place point M where there is 100 percent unemployment.


Instructions:  Use the graph tool, M1 , to identify the point on the graph that indicates total unemployment.

 
Explanation:
It is assumed that any level of production requires the use of some resources.  In order for all resources to be unemployed there can be no production of any good.  

Indicate the general condition of the economy in terms of approximate unemployment for each of the points on the figure provided.


Point A is consistent with an unemployment rate of 50 percent.

Point B is consistent with an unemployment rate of 20 percent.

Point C is consistent with an unemployment rate of 5 percent.



 
Explanation:
The further below the productions possibilities frontier a particular point is the greater the unemployment rate.  Point A is approximately half way between the curve and the origin.  Point B is closer to the curve but still indicates idle capacity of close to 20%.  Point C is very close to the curve putting unemployment in the more normal single digit range.


Given the information in the following table.
Point
Unit of Butter
Unit of Guns
A
15
0
B
14
1
C
12
2
D
9
3
E
5
4
F
0
5

What is the opportunity cost of going from point B to point D?

unit(s) of butter.

What is the opportunity cost of going from point E to point B?

unit(s) of guns.

 
Explanation:
The opportunity cost of any choice is the forgone value of the next best alternative. Units of butter: 14 - 9 = 5; Units of guns: 4 - 1 = 3.

Use the figure provided to answer the following questions.


a) What is the opportunity cost of going from point B to point C?  DVDs
b) What is the opportunity cost of going from point D to point C?  Cameras
c) What is the opportunity cost of going from point B to point A?  Cameras
d) What is the opportunity cost of going from point C to point D?  DVDs

 
Explanation:
Finding opportunity cost from a production possibilities frontier is simply a matter of comparing the coordinates of the designated points.  Movement from point B (170 DVDs, 50 Cameras) to point C (160 DVDs, 80 Cameras) leads to 30 more cameras at a loss/sacrifice of 10 DVDs.  


Use the graph provided to illustrate the law of increasing costs numerically.  (Hint: Start at point E and move toward point A.)


Instructions:  Determine the opportunity cost for more DVDs from each move.

The opportunity cost of a move from E to D is units of cameras.
The opportunity cost of a move from D to C is units of cameras.
The opportunity cost of a move from C to B is units of cameras.
The opportunity cost of a move form B to A is units of cameras.

These values indicate that the opportunity cost of DVDs is increasing as more DVDs are produced.
 
Explanation:
The opportunity cost of each move is determined by the horizontal distance from point to point.  Movement along a concave PPF will always exhibit increasing cost as this example demonstrates.



Refer to the figure below.



Which point best represents where our economy operated in 2012?

C correct


Explanation:
Point C is the best answer because the U.S. economy still possessed significant idle capacity with the unemployment rate in the 7.8 to 8.3 percent range in 2012.