3 Pages

ProgramAssignment2

Course: CSE 459.24, Winter 2011
School: Ohio State
Rating:
 
 
 
 
 

Word Count: 633

Document Preview

Programming CSE in C# Roger Crawfis The Ohio State University Programming Assignment #2 A SceneGraph Library Start with the accompanying worksheet and write a small library (.dll) for a SceneGraph interface (see http://en.wikipedia.org/wiki/Scenegraph). The library will support various nodes (derived from a base type of SceneNode) for drawables, for materials, for transformations and for other state changes....

Register Now

Unformatted Document Excerpt

Coursehero >> Ohio >> Ohio State >> CSE 459.24

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
Programming CSE in C# Roger Crawfis The Ohio State University Programming Assignment #2 A SceneGraph Library Start with the accompanying worksheet and write a small library (.dll) for a SceneGraph interface (see http://en.wikipedia.org/wiki/Scenegraph). The library will support various nodes (derived from a base type of SceneNode) for drawables, for materials, for transformations and for other state changes. The class hierarchy will look like the following: ISceneNode o IDrawableNode (derived from ISceneNode) DrawableNodeBase (implements IDrawNode) Cube (derived from DrawableNodeBase) Sphere (derived from DrawableNodeBase) Building (derived from DrawableNodeBase) Terrain (derived from DrawableNodeBase) o ITransformNode (derived from ISceneNode) Camera (implements ITransformNode) Rotate (implements ITransformNode) Translate (implements ITransformNode) Scale (implements ITransformNode) Perspective (implements ITransformNode) o IStateNode (derived from ISceneNode) DrawMode (implements IStateNode) o IGroupNode (derived from ISceneNode) ISceneNode, IDrawableNode, ITransformNode and IStateNode are all interfaces. DrawableNodeBase is an abstract class and has a partial implementation in it. ISceneNode has several behaviors defined: ISceneNode o void Accept(IVisitor visitor) o string Name { get; } You will also create an interface called IVisitor as part of the Visitor Design Pattern (http://www.dofactory.com/Patterns/Patterns.aspx). Its behavior or contract is as follows (C++ style): Visitor o public: virtual void PreVisit(IDrawableNode) = 0; virtual void PostVisit(IDrawableNode) = 0; virtual void PreVisit(ITransformNode) = 0; virtual void PostVisit(ITransformNode) = 0; virtual void PreVisit(IStateNode) = 0; virtual void PostVisit(IStateNode) = 0; virtual void PreVisit(IGroupNode) = 0; virtual void PostVisit(IGroupNode) = 0; In C++ we would call a class a pure abstract class if all of its members were defined this way (public, virtual and no implementation (=0)), and it contained no fields or other data. We will implement a few of concrete classes that support the IVisitor interface. One will simply the walk tree and print out the names. Another will print out the name as well as the type (using the ToString method of the Type type). It should print this out in a pretty format, with indentation of the children (aka a treeview like display). Visitor o NameVisitor prints out the names to the console (implements IVisitor). o NameTypeVisitor prints out the name and the type to the console (implements IVisitor). This was done in the accompanying worksheet. Other details: DrawableNodeBase has an abstract Draw method. GroupNode will need an additional method to add and remove children from its collection. You should use a generic collection internally for the children. Both IStateNode and ITransformNode have methods for Apply and Unapply. For Draw and the Apply/Unapply methods simply print out a message to the console as your implementation of these in your concrete classes. A Sample Application You will also create an additional application (a Console app) that will create the scenegraphs and print them out. For now, we will hard code the creation process. Use good functional decomposition in this sample application. In other words have a separate procedure or method to create each scenegraph. Test your code out with several scenegraphs. Each scenegraph has a single root node. Provide a depth up to seven levels and a fairly good breadth. Test out printing of a sub-graph of your scene. Note: The scene graphs should be Directed Acyclic Graphs (DAG), meaning that a child of one of the nodes should not also be an ancestor (parent, grandparent, etc.) of the same node. Additional Tasks 1. In the Properties folder, Open the AssemblyInfo.cs file and fill in the Title through the Copyright information. This information will be displayed if you look at the properties of your .exe file. 2. Provide comments explaining your logic. Also, add a block comment to the beginning of the file listing your name, the course and a description of the lab (from above but in a completed tense). 3. Do a Build Clean, zip up your solution (no .exe files are allowed) and then submit your assignment using submit c459ae directory.
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Ohio State - CSE - 459.24
CSE Programming in C#Programming Assignment #3Roger CrawfisA SceneGraph Library - Part II: Internal classes, Factories and Serialization. We will now create two applications, one for creating a scenegraph and the other for reading it in and printing it
Ohio State - CSE - 459.24
CSE 459.24 Programming in C# In-Class Worksheet #1You should have Visual Studio 2008 open.Roger Crawfis1. Create a new Project either from the shortcut on the Start page or through the file menu, 2. Select the type to be a C# Console Project 3. In the
Ohio State - CSE - 459.24
CSE 459.24 Programming in C# In-Class Worksheet #2Roger CrawfisOverviewFor this worksheet, we will create a class library and then use the resulting dll in a console application. This worksheet is a start on your next programming assignment, where we w
Ohio State - CSE - 459.24
CSE 459.24 Programming in C# In-Class Worksheet #3Creating a Windows Forms application You should have Visual Studio 2008 open.Roger Crawfis1. Create a new Project either from the shortcut on the Start page or through the file menu, 2. Select the type
Ohio State - CSE - 459.24
CSE 459.24 Programming in C# In-Class Worksheet #4Creating a Windows Forms application with Data Binding You should have Visual Studio 2008 open.Roger Crawfis1. Create a new Project either from the shortcut on the Start page or through the file menu, 2
FIU - FIN3403 - FIN3403
1. You plan to analyze the value of a potential investment by calculating the sum of the present values of its expected cash flows. Which of the following would lower the calculated value of the investment?AnswerThe total amount of cash flows remains th
FIU - FIN3403 - FIN3403
Question 110 out of 10 pointsYou plan to analyze the value of a potential investment by calculating the sum of the present values of its expected cash flows. Which of the following would lower the calculated value of the investment?AnswerCorrect Answ
FIU - FIN3403 - FIN3403
1.Net working capital is equal to current assets minus accounts payable and accruals.Answer True False 10 pointsQuestion 21. Assume that two firms are both following generally accepted accounting principles. Both firms commenced operations two years a
FIU - FIN3403 - FIN3403
Question 11. Beranek Corp has $665,000 of assets, and it uses no debt-it is financed only with common equity. The new CFO wants to employ enough debt to raise the debt/assets ratio to 40%, using the proceeds from borrowing to buy back common stock at its
FIU - FIN3403 - FIN3403
Question 11. Assume that your uncle holds just one stock, East Coast Bank (ECB), which he thinks has very little risk. You agree that the stock is relatively safe, but you want to demonstrate that his risk would be even lower if he were more diversified.
FIU - FIN3403 - FIN3403
Question 11. Which of the following statements is CORRECT?AnswerThe percentage flotation cost associated with issuing new common equity is typically smaller than the flotation cost for new debt. The WACC as used in capital budgeting is an estimate of t
FIU - FIN3403 - FIN3403
CHAPTER 2 TIME VALUE OF MONEY(Difficulty: E = Easy, M = Medium, and T = Tough) Note: Most problems assume students have a calculator with a y x feature (i.e., an exponential feature). Annuity problems for finding the interest rate or the number of period
FIU - FIN3403 - FIN3403
Chapter 10 Practice Problems(10-1) Capital 1. FI Answer: a EASY "Capital" is sometimes defined as funds supplied to a firm by investors. a. True b. False (10-1) Cost of capital 2. FI Answer: a EASYThe cost of capital used in capital budgeting should ref
FIU - FIN3403 - FIN3403
Chapter 10 Practice Problems(10-1) Capital 1. FI Answer: a EASY "Capital" is sometimes defined as funds supplied to a firm by investors. a. True b. False (10-1) Cost of capital 2. FI Answer: a EASYThe cost of capital used in capital budgeting should ref
FIU - FIN3403 - FIN3403
Practice Problems Chapter 11(11-5) Reinvestment rate assumption 1. FI Answer: a EASY The NPV method's assumption that cash inflows are reinvested at the cost of capital is generally more reasonable than the IRR's assumption that cash flows are reinvested
FIU - FIN3403 - FIN3403
CHAPTER 12 Practice Problems CASH FLOW ESTIMATION AND RISK ANALYSIS(12-1) Cash flow estimation 1. F I K Answer: b EASYAlthough it is extremely difficult to make accurate forecasts of the revenues that a project will generate, projects' initial outlays a
FIU - FIN3403 - FIN3403
Question 110 out of 10 pointsStock X has the following data. Assuming the stock market is efficient and the stock is in equilibrium, which of the following statements is CORRECT?Expected dividend, D1 Current Price, P0 Expected constant growth rateAns
FIU - FIN3403 - FIN3403
Exam2 FIN370 Fall 2008 KeyVersion B1. A call provision in a bond agreement grants the issuer the right to: A. repurchase the bonds prior to maturity at a pre-specified price. B. change the coupon rate provided the bondholders are notified in advance. C.
FIU - FIN3403 - FIN3403
CHAPTER 9 THE COST OF CAPITAL(Difficulty: E = Easy, M = Medium, and T = Tough)Multiple Choice: Problems Easy:Cost of common stock Answer: d Diff: E 1 . Bouchard Company's stock sells for $20 per share, its last dividend (D 0) was $1.00, and its growth
FIU - FIN3403 - FIN3403
Fin 3010 Exam III Summer 2009 Time: 100 minutes1. In constant growth model, expected capital gains yield changes year to year. a. True b. False 2. Expected dividend divided by the current price of a stock is called a. Actual Dividend b. Dividend Growth c
FIU - FIN - 4604
Chapter 01 - Globalization and the Multinational FirmCHAPTER 1 GLOBALIZATION AND THE MULTINATIONAL FIRM ANSWERS & SOLUTIONS TO END-OF-CHAPTER QUESTIONS AND PROBLEMSQUESTIONS1. Why is it important to study international financial management?Answer:We
FIU - FIN - 4604
Chapter 02 - International Monetary SystemCHAPTER 2 INTERNATIONAL MONETARY SYSTEM ANSWERS & SOLUTIONS TO END-OF-CHAPTER QUESTIONS AND PROBLEMSQUESTIONS 1. Explain Gresham's Law. Answer: Gresham's law refers to the phenomenon that bad (abundant) money dr
FIU - FIN - 4604
Chapter 05 - The Market for Foreign ExchangeCHAPTER 5 THE MARKET FOR FOREIGN EXCHANGE ANSWERS & SOLUTIONS TO END-OF-CHAPTER QUESTIONS AND PROBLEMSQUESTIONS1. Give a full definition of the market for foreign exchange.Answer:Broadly defined, the foreig
FIU - FIN - 4604
Chapter 06 - International Parity Relationships and Forecasting Foreign Exchange RatesCHAPTER 6 INTERNATIONAL PARITY RELATIONSHIPS AND FORECASTING FOREIGN EXCHANGE RATES ANSWERS & SOLUTIONS TO END-OF-CHAPTER QUESTIONS AND PROBLEMSQUESTIONS1. Give a ful
FIU - FIN - 4604
Chapter 07 - Futures and Options on Foreign ExchangeCHAPTER 7 FUTURES AND OPTIONS ON FOREIGN EXCHANGE ANSWERS & SOLUTIONS TO END-OF-CHAPTER QUESTIONS AND PROBLEMSQUESTIONS1. Explain the basic differences between the operation of a currency forward mark
FIU - FIN - 4604
Chapter 10 - Management of Translation ExposureCHAPTER 10 MANAGEMENT OF TRANSLATION EXPOSURE SUGGESTED ANSWERS TO END-OF-CHAPTER QUESTIONS AND PROBLEMSQUESTIONS1. Explain the difference in the translation process between the monetary/nonmonetary method
FIU - FIN - 4604
Chapter 14 - Interest Rate and Currency SwapsCHAPTER 14 INTEREST RATE AND CURRENCY SWAPS ANSWERS & SOLUTIONS TO END-OF-CHAPTER QUESTIONS AND PROBLEMSQUESTIONS1. Describe the difference between a swap broker and a swap dealer.Answer: A swap broker arra
FIU - FIN - 4604
Suggested Solution to HW 1 Easy Example (Slide 37 of Lecture 2): If you are a Japanese trader with 1million. To take advantage of the opportunity, the trader needs to make the following arrangements: 1). Sell for $ with Barclays; 2). Sell $ for with Credi
FIU - FIN - 4604
Suggested Solution to HW 2 Slide 14 of Lecture 3: The market conditions are summarized as follows: i$ = 3%; i = 2.49%; S = $2/; F360($/)=? If F360($/) > $2.01/, then (1 + i$) < (F$/ /S$/)(1 + i). Thus, the trader can arrange the following transactions to
FIU - FIN - 4604
Suggested Solution to HW 3 Problem 7.1 (See the excel file (7.1&7.2) for some calculation details): Note that the short side of a futures contract gains (loses) from a declining (increasing) price of the underlying asset. Thus, $1,700 + [($1.3140 - $1.312
FIU - FIN - 4604
Suggested Solution to HW 4 Slide 47 of Lecture 8: To use the money market to hedge her 100,000 shoe sale receivable in one year, the American exporter can do the following: Step 1: Borrow the present value of 100,000 for one year, that is, 100,000/(1+5%)=
FIU - FIN - 4604
Quiz 1 1. What major dimension sets apart international finance from domestic finance? A. Foreign exchange and political risks B. Market imperfections C. Expanded opportunity set D. All of the above 2. An MNC may gain from its global presence by A. spread
FIU - FIN - 4604
Quiz 2 1. Consider a U.S. importer desiring to purchase merchandise from a Dutch exporter invoiced in euros, at a cost of 512,100. The U.S. importer will contact his U.S. bank (where of course he has an account denominated in U.S. dollars) and inquire abo
FIU - FIN - 4604
Quiz 3 1. Suppose you observe a spot exchange rate of $1.50/. If interest rates are 3% APR in the U.S. and 5% APR in the euro zone, what is the no-arbitrage 1-year forward rate? A. 1.5291/$ B. $1.5291/ C. 1.4714/$ D. $1.4714/ Answer: F($/) = S($/)(1+i$)/(
FIU - FIN - 4604
Quiz 4 1. Purchasing Power Parity (PPP) theory states that A. the exchange rate between currencies of two countries should be equal to the ratio of the countries' price levels. B. as the purchasing power of a currency sharply declines (due to hyperinflati
FIU - FIN - 4604
Quiz 5 1. Yesterday, you entered into a futures contract to buy 62,500 at $1.50/. Your initial margin was $3,750 (= 0.04 62,500 $1.50/ = 4 percent of the contract value in dollars). Your maintenance margin is $2,000 (meaning that your broker leaves you al
FIU - FIN - 4604
Quiz 6 1. A swap bank makes the following quotes for 5-year swaps and AAA-rated firms:A. The bank stands ready to pay $5.2% against receiving dollar LIBOR on 5-year loans. B. The bank stands ready to receive 7% against receiving dollar LIBOR on 5-year lo
San Jose State - MIDTERM - 3
From Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgFrom Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgFrom Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgFrom Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgFrom Tau Beta P
San Jose State - MIDTERM - 3
From Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgFrom Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgFrom Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgFrom Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgFrom Tau Beta P
San Jose State - MIDTERM - 3
From Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgAnthropology 25 Midterm1.Since the definition of ethnography is a scientific study of people, cultures, and ethnic groups,Nathan's book is clearly an ethnography. In the book, Nathan, a profes
San Jose State - MIDTERM - 3
From Tau Beta Pi SJSU Exam Library: http:/exams.tbpsjsu.orgME147 Vibration and Control Systems Fall 2010 Wang 1-st Test 1. A mechanical system is shown in Fig. 1 .The disk can rotate about the point o. For analysis let the displacement variable x to be t
Centenary College New Jersey - FINANCE - 101
Centenary College New Jersey - FINANCE - 101
Centenary College New Jersey - FINANCE - 101
Centenary College New Jersey - FINANCE - 101
Centenary College New Jersey - FINANCE - 101
Centenary College New Jersey - FINANCE - 101
Centenary College New Jersey - FINANCE - 101
Chapter 4Introduction to Risk ManagementBasic Risk Management Firms convert inputs into goods and servicesoutput commodity inputproducerbuyer A firm is profitable if the cost of what it produces exceeds the cost of its inputs A firm that actively u
Centenary College New Jersey - FINANCE - 101
Derivatives Markets Class # 3Collars A collar represents a bet that the price of the underlying asset will decrease and resembles a short forward A zero-cost collar can be created when the premiums of the call and put exactly offset one another3-2Spec
Centenary College New Jersey - FINANCE - 101
Tutorial Week 10 Based on Lectures 15&16 Week 9 Legal Principles of Risk & Insurance 1) Fundame of the principle of indemnity include which of the following? ntal I. To reduce physical hazards. purposes II. To prevent the insured from profiting from ins
Centenary College New Jersey - FINANCE - 101
Chapter 9Fundamental Legal PrinciplesAnswers to Case Application (1) Jeff has an insurable interest equal to the full value of the building, since he would lose financially if a loss occurs. (2)Richard does not have an insurable interest, since the buil
Centenary College New Jersey - FINANCE - 101
Chapter 10Analysis of Insurance Contracts Answers to Case Applicationa. Donna is covered under her policy since she is driving a nonowned car with the permission of the owner. She is also covered under Mike's policy. However, Mike's policy is primary,
Centenary College New Jersey - FINANCE - 101
Chapter 8Government Regulation of Insurance Answers to Case Applicationa. The risk-based capital requirements have increased the minimum amount of capital for many insurers and decreased the chance that a failing insurer will exhaust its capital before
Centenary College New Jersey - FINANCE - 101
Chapter 5Types of Insurers and Marketing Systems Answers to Case Applicationa. A mutual insurer has no stockholders and is legally owned by the policyowners. Thus, the objective of legal ownership by Commercial Insurance would not be met if the new sub
Centenary College New Jersey - FINANCE - 101
Chapter 7Financial Operations of Insurers Answers to Case Application1. According to the balance sheet equation, total assets equals total liabilities plus owners' equity. If the total assets are $900 million and the total liabilities are $640 million,
Centenary College New Jersey - FINANCE - 101
Chapter 3Introduction to Risk Management Answers to Case Applicationa. See answer to Review Question 3.b. and c. Major loss exposures and techniques for handling the loss exposure include the following: Physical damage to a bus in an accident (can be
Centenary College New Jersey - FINANCE - 101
Chapter 2Insurance and Risk Answers to Case Applicationa. b. c. d. This is not insurance. Although the risk of a defective television set is transferred to the manufacturer, there is no pooling of losses. This is not insurance. Although the risk of def
Centenary College New Jersey - FINANCE - 101
Chapter 1Risk in Our SocietyAnswers to Case Application Retention. Because the car is old and has a limited market value, collision insurance should not be purchased. Retention can be used to deal with the exposure. Liability insurance. Because the expo
Centenary College New Jersey - FINANCE - 101
Derivatives Markets Class # 3Collars A collar represents a bet that the price of the underlying asset will decrease and resembles a short forward A zero-cost collar can be created when the premiums of the call and put exactly offset one another3-2Spec
Centenary College New Jersey - FINANCE - 101
Gregory M. McDermottRights or Obligations?Long option positions?Short option positions?Rights or Obligations?Long option positions?RightsShort option positions?ObligationsFill in the blanks. Call Put Long ShortFill in the blanks. Call Put Long S
Centenary College New Jersey - FINANCE - 101
Saint Joseph's University Haub School of Business Derivatives Markets Fin 612 Spring 2012StudentTrade #pl e Ex amDate 1/33/12Buy/Sell B2/3/12SQuant 10 Limit Stop 10 10 Limit Stop 10 10 Limit Stop 10 10 Limit Stop 10 10 Limit Stop 10 10 Limit Stop