Search This Blog

Loading...

Expert Answers



1.  What happens right after the identification of classes in the object oriented design process? (Points : 5)
Determining the class responsibilities
Determining class interaction
Creating UML diagram
Developing SOW

2.  In what type(s) of situation(s) would it be best to make a new derived class from a base class? (Points : 5)
When your old class is a general form of what your new class should be
When you need to create a specialized class from an existing class
A and B
None of the above

3.  _____ is the ability to combine data and operations on that data into a single unit. (Points : 5)
Inheritance
Encapsulation
Polymorphism
Composition

4.  A black box is a term used to describe a system that can be understood solely based on its inputs, a description of its processing and the resulting _____. (Points : 5)
outputs
inherited processes
attributes
accessors

5.  Given a private attribute called species, which of the following are proper pseudocode implementations for a getter and a setter? (Points : 5)
void GetSpecies(){return species}
void SetSpecies(string newSpecies){ species = newSpecies }
string GetSpecies (){return species }
string SetSpecies (string newSpecies){return newSpecies }
string GetSpecies (){species = newSpecies }
void SetSpecies (string newSpecies){return species }
string GetSpecies (){return species }
void SetSpecies (string newSpecies){ species = newSpecies}

6.  You are tasked to create an EntertainmentSystem class and you want to minimize data dependencies. You also need to protect specific attributes from outside entities. What object-oriented concept(s) would you use to accomplish these goals? (Points : 5)
Composition of classes
Universal access to methods
Inheritance
Encapsulation
All of the above

7.  Which of the following statements are true? (Points : 5)
Interfaces are written across multiple files, unlike classes.
The name of an interface often begins with a lowercase “I” in C#.
Interfaces can be used to implement a form of triple inheritance.
Interfaces are not instantiated like a concrete class.

8.  Which of the following statements is/are false? (Points : 5)
Abstract methods may or may not contain a method body
Abstract methods may be defined in an abstract class, a regular class or an interface
Abstract methods do not specify a return type
All of the above
None of the above

9.  In terms of object-oriented programming, rules for the use of an application programming interface or framework can be enforced through the use of a(n) _____. (Points : 5)
encapsulation
inheritance hierarchy
contract
object constructed with a multi-arg constructor
None of the above

10.  Data/information hiding and encapsulation improves construction and maintenance because: (Points : 5)
Program bugs are isolated to a single class.
Programming to an interface makes the code more logical.
Both A and B
None of the above

11.  What are some of the characteristics of a “good” comment? (Points : 5)
Detailed comments should address all aspects of the code and structure
Code markers should be used to show what the developer still needs to do
Comments showing the intent of the code
All of the above
None of the above

12.  Which of the following allow a programmer to reduce the complexity of an object-oriented program? (Points : 5)
Create each class in a separate file
Combine multiple classes in a same file to allow easy access
Using one file to combine all the code to allow easy access
None of the above

13.  Assuming a class definition of a Horse that has a default constructor and constructor that accepts three string arguments, and the appropriate properties defined, how many objects are created in the code below?
static void Main(string[] args)
{Horse newObject;
Horse newHorseObject = new Horse();
Horse newHorse = new Horse("Horse", "Ben", "Appaloosa");
newObject = newHorse;
newObject = newHorseObject;}
(Points : 5)
3
4
2
5

14.  Which of the following is a proper implementation for a getter? (Points : 5)
intGetDayOfBirth() { return day;}
void GetDayOfBirth() {return day;}
intGetDayOfBirth (int day) {this.day = day;}
void GetDayOfBirth () {return day;}

15. Which of the following declares an abstract method in an abstract class? (Points : 5)
public abstract CalculateTip();
public abstract double CalculateTip();
public double abstract CalculateTip();
public double CalculateTip() {}

16. Does Encapsulation imply Data/Information Hiding in object-oriented programming or vice versa? Are these two terms the same? Please explain. (Points : 18)

17.  List the benefits of using inheritance. (Points : 18)

18.  What are the differences between inheriting interface and inheriting implementation? How do inheritance hierarchies designed for inheriting interface differ from those designed for inheriting implementation? (Points : 18)

19.  Given the following list of classes, attributes and methods,
identify which items are classes, which items are attributes and which items are methods;
identify which class each attribute and method belongs to; and
suggest a class hierarchy given your list of classes.
*Note – no particular capitalization scheme is used in the list below to differentiate between classes, methods and attributes.

20.  Briefly describe what an Interface is and how it can be used in an object-oriented program. Provide example pseudocode showing how an IComputer Interface might be constructed. (Points : 18)

21. Keeping in mind all object-oriented programming best practices, create a class for a Keyboard, with the following specifications:
· Specify two data members
· Default Constructor
· Overloaded Constructor which takes both data member values as input.
· Generate a unique identification number for each object instantiated from this class. Use a static data member to keep track of the identification number last assigned to an object so that duplications will not occur. Code the necessary portion of the class definition so as to support this requirement.
· Show a statement which instantiates an object of this class using the overloaded constructor.
You do not need to provide any accessor/mutator methods or other methods. (Points : 22)

22. Briefly describe best practices as it relates to naming classes. (Points : 18) 

Comp 230 Final Exam



1. (TCO 1) Write the Windows CLI NET commands that will turn the Spooler service OFF and then ON. (Points : 13)

2. (TCO 1) Write the Windows CLI commands that will Clear the screen; Turn off Command echo; and display the current IP address, Subnet Mask, and Default Gateway. (Points : 13)

3. (TCO 2) Write the VBScript code lines that perform the following tasks: Define a variable age that is initialized to 25. Display a message that uses the variable to display “Your age is 25, but in 10 years you will be 35.” where the value 25 and 35 use the variable age. (Points : 14)

4. (TC0 3) Given the variables hoursWorked and payRate, write the VBScript code that will calculate grossPay such that all hoursWorked 40 will be paid at time and a half. (Points : 14)

5. 1. (TCO 4) Write the VBScript code that initializes all the variables in the numArray(100) to the value numArray(0) =1, numArray(1) =2,…,numArray(100) =101. (Points : 14)

6. (TCO 5) Write a VBScript function called GetName( ) that prompts the user to input his or her name and returns the name value. Use the StdIn and StdOut streams for input and output. (Points : 14)

7. (TCO 6) Write the VBScript code that defines the Scripting.FileSystemObject and the file C:\Data\DataFile.txt for writing. Make sure the file will be created if it doesn’t exist, and ensure that the format is ASCII. (Points : 14)

8. (TCO 7) Assuming that you are connected to a database called Computers.mdb with the fields Computer, Hostname Room_Num, CPU_Type, Num_CPUs, Bit_Size, OS_Type, Memory, Speed and HDD_Size, write the SQL Query String sqlStr such that all the fields will be displayed for the records that indicate a speed less than two and a memory value less than four. The returned records should be sorted by Room_Num. (Points : 14)

Netflix



1.What characteristics of modern organizations does Netflix exemplify? Describe what type of an organization it is, what type of jobs its workers perform, and the probable characteristics of its workers.

2. What would be the advantages of working for Netflix? The disadvantages?

3. Do you think Netflix will be around a decade from now?

Multiple Choice Answers



Question 1
Accrued interest resulting from a trade note receivable would have which effect on the categories?
A. Total assets would be increased.
B. Owner's equity would be decreased.
C. Total liabilities would be increased.
D. None of these answers are correct.

Question 2
A promissory note comes due on the:
A. maturity date.
B. issue date.
C. interest note.
D. discount date.

Question 3
Interest on a $3,000, 10% promissory note for four months is:
A. $100.
B. $30.
C. $75.
D. $300.

Question 4
Steadman's Computer endorses a customer's note dated June 17 to the bank on August The interest rate on the note is 10%, and the bank discount rate is 12%. The note matures on September 6. The discount period is:
A. 60 days.
B. 0 days.
C. 81 days.
D. 21 days.

Question 5
On February 15, Weber Services discounts a customer's 9%, 90-day, $10,000 note dated January 10. The discount rate charged by the bank is 12%. The discount period is:
A. 90 days.
B. 0 days.
C. 54 days.
D. 36 days.

Question 6
Interest expense is on a merchandise company's income statement under the heading:
A. Daily Expenses.
B. Borrowing Expenses.
C. Operating Expenses.
D. Other Expenses or Interest Expense.

Question 7
Given a 360-day year, the interest expense on a $7,300, 8%, 77-day promissory note payable is:
A. $124.91.
B. $459.09.
C. $584.00.
D. some other amount.

Question 8
The proceeds from discounting a note receivable are the:
A. maturity value - discount.
B. principal - discount.
C. maturity value minus principal.
D. principal + discount.

Question 9
Martin Company needs additional time to pay its accounts payable to Boster Company. Martin makes a written promise to pay Boster the amount on a certain date. Boster records this transaction as follows:
A. debit Cash; credit Accounts Receivable.
B. debit Accounts Receivable; credit Notes Receivable.
C. debit Notes Receivable; credit Accounts Receivable.
D. debit Notes Receivable; credit Cash.

Question 10
A $6,500, 12% note dated April 23 for 88 days was discounted on June 2 at 14%. The number of days in the discount period is:
A. 40 days.
B. 48 days.
C. 88 days.
D. some other number.

Question 11
There was no accrual for interest on a promissory note receivable; this error would cause:
A. the period's net income to be overstated.
B. the period end assets to be overstated.
C. the period end liabilities to be understated.
D. the period's net income to be understated.

Question 12
Using a 360-day year, interest calculated for 180 days on a $7,000, 9% promissory note is:
A. $315.
B. $310.
C. $630.
D. some other amount.

Question 13
Brooke Company grants James Decorating additional time to pay its past due account. James makes a written promise to pay Brooke the amount on a certain date. James records this transaction as follows:
A. debit Accounts Payable; credit Notes Payable.
B. debit Cash; credit Accounts Receivable.
C. debit Accounts Receivable; credit Notes Receivable.
D. debit Notes Receivable; credit Accounts Receivable.

Question 14
A $6,500, 12% note dated April 23 for 88 days was discounted on June 2 at 14%. The amount of the discount (using a 360-day year) is:
A. $190.67.
B. $124.89.
C. $780.00.
D. $115.56.

Question 15
The basic formula for calculating the interest on a note is:
A. Interest = Principal × Rate × Time.
B. Interest = (Principal × Rate) - Time.
C. Interest = Principal × Rate/ Time.
D. Interest = (Principal × Time) + Rate.

Question 16
The company returned $200 of damaged merchandise. The entry to record this under the periodic inventory method is:
A. debit Merchandise Inventory $200; credit Accounts Payable $200.
B. debit Accounts Payable $200; credit Purchases Returns and Allowances $200.
C. debit Accounts Payable $200; credit Merchandise Inventory $200.
D. debit Cost of Goods Sold $200; credit Accounts Payable $200.

Question 17
A credit customer purchased $450 worth of items. Two days later, the customer returned $300 worth of those items. The entry to record this under the perpetual inventory method would include:
A. a debit to Sales Returns and Allowances $300; credit Accounts Receivable $300.
B. a credit to Cost of Goods Sold for our cost.
C. a debit to Merchandise Inventory for our cost.
D. All of the above.

Question 18
As a result of understating ending inventory by $10,000 at the end of Year 1:
A. there will be no effect on net income for Year 2.
B. net income for Year 2 will be overstated.
C. net income for Year 2 will be understated.
D. ending inventory for Year 2 will be overstated.

Question 19
Last year's ending inventory was overstated. This error would cause:
A. this period's net income to be understated.
B. this period's end assets to be overstated.
C. this period's net income to be overstated.
D. None of these are correct.

Question 20
The inventory method that assumes the cost of the ending inventory consists of new inventory is:
A. FIFO.
B. LIFO.
C. weighted-average.
D. specific invoice.

Question 21
Chewy Candy has a beginning inventory of $1,000 with a retail value of $1,800. June purchases were $3,000, with a retail value of $4,700 and retail sales were $4,200.What is the June 30 estimated ending inventory at cost under the retail method?
A. $4,161
B. $949
C. $1,416
D. $351

Question 22
An understated cost of goods sold of $100 will cause:
A. income to be understated.
B. merchandise inventory to be understated.
C. income to be overstated.
D. None of these answers are correct.

Question 23
The advantage of the weighted-average method is:
A. flow of goods and flow of costs are the same.
B. old costs are matched against current income.
C. an equal cost is assigned to each unit so net income does not fluctuate as much as with other methods.
D. it matches current selling prices and current costs.

Question 24
Barry's Books uses a periodic inventory system. Barry's Books sold 45 copies of Helpful Hints during September. Other data for September include:
Sep. 1 Balance 12 books @ $20
8 Purchased 10 books @ $21
17 Purchased 30 books @ $22
25 Purchased 15 books @ $24
Ending inventory under the FIFO method is:
A. $528.
B. $514.
C. $440.
D. $450.

Question 25
This method assumes that the most recently acquired goods are sold first.
A. Weighted-average method
B. Specific invoice method
C. FIFO
D. LIFO

Question 26
If the ending inventory is overstated in period 1:
A. goods available for sale in period 2 are overstated.
B. cost of goods sold in period 2 is overstated.
C. beginning inventory in period 2 is overstated.
D. All of these answers are correct.

Question 27
The perpetual inventory system is a system which:
A. updates inventory continuously.
B. uses either FIFO, LIFO, weighted-average, or specific invoice method.
C. never needs a physical inventory taken.
D. both A and B.

Question 28
This inventory method produces the lowest income tax during a period of inflation.
A. Weighted-average
B. FIFO
C. LIFO
D. All would have the same tax effect.

Question 29
The inventory method that matches old costs with current selling prices is:
A. specific invoice.
B. weighted-average.
C. LIFO.
D. FIFO.

Question 30
The journal entry to record the return of a purchase of inventory under the periodic system includes a:
A. credit to Merchandise Inventory.
B. credit to Purchases Returns and Allowances.
C. debit to Merchandise Inventory.
D. credit to Purchases.

Multiple Choice Answers



(TCO 7) In terms of object-oriented programming, rules for the use of an application programming interface or framework can be enforced through the use of a(n) _____. (Points : 5)
encapsulation
inheritance hierarchy
contract
object constructed with a multi-arg constructor
None of the above

(TCO 8) Data/information hiding and encapsulation improves construction and maintenance because: (Points : 5)
Program bugs are isolated to a single class.
Coupling is increased.
Programming to an interface makes the code and design difficult.
All of the above
None of the above

Question 5.5. (TCO 8) What are some of the characteristics of a “good” comment? (Points : 5)
Summary comments that distill the logic of an algorithm
Comments are well written and clear
Comments showing the intent of the code
All of the above
None of the above

(TCO 9) Which of the following allow a programmer to reduce the complexity of an object-oriented program? (Points : 5)
Create each class in a separate file
Using namespaces as a container for logically related items
Using namespaces to create global types
All of the above
None of the above

(TCO 1) Assuming a class definition of a Bird that has a default constructor and constructor that accepts three string arguments, and the appropriate properties defined, how many objects are created in the code below?
static void Main(string[] args)
{Bird newObject;
Bird newBirdObject;
Bird newBird = new Bird("Bird", "Pockets", "Quaker Parakeet"); ;
newObject = null;}
(Points : 5)
0
2
3
1

(TCO 2) Given a private attribute called favoriteColor, which of the following are proper implementations for a getter and a setter? (Points : 5)
int GetFavoriteColor(){return favoriteColor;}, int SetFavoriteColor(int favoriteColor){return favoriteColor;}
void GetFavoriteColor (){return favoriteColor;}, void SetFavoriteColor (int favoriteColor){this.favoriteColor = favoriteColor;}
string GetFavoriteColor (){return favoriteColor;}, void SetFavoriteColor (string favoriteColor){this.favoriteColor = favoriteColor;}
string GetFavoriteColor (){this.favoriteColor = favoriteColor;}, void SetFavoriteColor (string favoriteColor){return favoriteColor;}

(TCO 7) Which of the following declares an abstract method in an abstract class? (Points : 5)
public abstract CalculateTip();
public abstract double CalculateTip();
public double abstract CalculateTip();
public double CalculateTip() {}

(TCO 2) A class is designed with three public attributes: attributeOne, attributeTwo and attributeThree. attributeOne is an integer data type, attributeTwo is a double data type and attributeThree is a string data type. Which pseudocode representation(s) of setters would be appropriate for this class? (Points : 5)
A. int SetAttributeOne(int newAttributeOne)
{ return attributeOne}
B. void SetAttributeTwo(double newAttributeTwo)
{ attributeTwo = newAttributeTwo}
C. string SetAttributeThree (int newAttributeThree)
{ attributeThree = newAttributeThree}
D. void SetAttributeOne ()
{ attributeOne = 0}
Both A and C
None of the above

(TCO 2) You are tasked to create an EntertainmentSystem class and you want to minimize data dependencies. You also need to protect specific attributes from outside entities. What object-oriented concept(s) would you use to accomplish these goals? (Points : 5)
Composition of classes
Universal access to methods
Inheritance
Encapsulation

(TCO 7) Which of the following statements are true? (Points : 5)
Interfaces contain a list of methods to be implemented later.
Interfaces contain at least one abstract and one implemented method.
Interfaces are instantiated just like regular classes.
An Interface is a very specific type of class implementation.

(TCO 7) Which of the following statements is/are true? (Points : 5)
Interfaces contain both regular and abstract methods
Abstract classes always provide implementations for all of their methods
Abstract methods can be inherited by subclasses
None of the above

Expert Answers



1 Suppose that the U.S. Department of Agriculture (USDA) administers the price floor for cheese, set at $0.17 per pound of cheese. (In real life, the actual price floor was officially set at $16.10 per hundredweight of cheese. One hundredweight is 100 pounds.) At that price, according to data from the USDA, the quantity of cheese produced in 2009 by U.S. producers was 212.5 billion pounds, and the quantity demanded was 211 billion pounds. To support the price of cheese at the price floor, the USDA had to buy up 1.5 billion pounds of cheese. The accompanying diagram shows supply and demand curves illustrating the market for cheese.
a. In the absence of a price floor, the maximum price that a few of the consumers are willing to pay is $0.20 for a pound of cheese whereas the market equilibrium price is $0.13 per pound. The graph also shows that the minimum price at which a few of the producers are willing to sell is $0.06 per pound. In the absence of a price floor, how much consumer surplus is created?
b. How much producer surplus?
c. What is the total surplus
d. The maximum price that a few of the consumers are willing to pay is $0.20 per pound of cheese, and the price floor is set at $0.17 per pound. With the price floor at $0.17 per pound of cheese, consumers buy 211 billion pounds of cheese. How much consumer surplus is created now?
e. The minimum price at which a few of the producers are willing to sell a pound of cheese is $0.06, and the price floor is set at $0.17 per pound. With the price floor at $0.17 per pound of cheese, producers sell 212.5 billion pounds of cheese (some to consumers and some to the USDA). How much producer surplus is created now?
f. The surplus cheese USDA buys is the difference between the quantity of cheese producers sell (212.5 billions of pounds of cheese) and the quantity of cheese consumers are willing to buy at the price floor (211 billions of pounds of cheese). How much money does the USDA spend on buying up surplus cheese?
g. Taxes must be collected to pay for the purchases of surplus cheese by the USDA. As a result, total surplus (producer plus consumer) is reduced by the amount the USDA spent on buying surplus cheese. Using your answers for parts b—d, what is the total surplus when there is a price floor?
h. How does this compare to the total surplus without a price floor from part a?


2 The accompanying table shows the price and yearly quantity sold of ice cream cones on Sidfield Island.
Price of Ice Cream Cones Quantity of Ice Cream Cones Demanded
$1 3000
$2 2400
$3 1600
$4 800
a. Using the midpoint method (show your work), calculate the price elasticity of demand when the price of an ice cream cone rises from $1 to $2.
b. What does this estimate imply about the price elasticity of demand for ice cream cones?
c. Using the midpoint method (show your work), calculate the price elasticity of demand when the price of an ice cream cone rises from $3 to $4.
d. What does this estimate imply about the price elasticity of demand for ice cream cones?
e. Notice that the estimates from (a) and (b) above are different. Why do price elasticity of demand estimates change along the demand curve? 

Multiple Choice Answers



1) The entry to record a purchase of merchandise on credit includes a:
A. debit to Purchases and a credit to Accounts Receivable.
B. credit to Purchases and a credit to Accounts Payable.
C. debit to Accounts Payable and a credit to Purchases.
D. debit to Purchases and a credit to Accounts Payable.

2) Freight charges on merchandise purchases should be debited to the:
A. Purchases account.
B. Accounts Payable account.
C. Freight In account.
D. creditor's account in the subsidiary ledger.

3) The Purchases account is a __________ account.
A. permanent
B. temporary
C. subsidiary
D. liability

4) Purchases of merchandise on credit should be recorded in the __________ journal.
A. purchases
B. general
C. cash payments
D. sales

5) Credit terms of 1/10, n/30 mean that:
A. payment in full is due 10 days after date of the invoice.
B. payment in full is due 30 days after date of the invoice.
C. if the invoice is paid within 10 days of its date, a 1% discount may be taken; otherwise the total amount is due in 20 days.
D. if the invoice is paid within 10 days of its date, a 1% discount may be taken; otherwise the total amount is due in 30 days.

6) Postings to the accounts payable ledger from the purchases journal should be made:
A. daily.
B. weekly.
C. monthly.
D. at the end of the fiscal period.

7) A creditor's account in the accounts payable ledger has a $1,600 beginning balance. After a transaction for $700 is posted from the purchases journal, the balance of the creditor's account is:
A. $2,300 debit.
B. $900 credit.
C. $2,300 credit.
D. $900 debit.

8) To record a return of merchandise purchased on credit, the accountant would debit __________ and credit __________.
A. Purchases Returns and Allowances; Accounts Receivable
B. Purchases Returns and Allowances; Purchases
C. Accounts Payable; Purchases Returns and Allowances
D. Purchases; Purchases Returns and Allowances

9) The total of the balances in the creditor's accounts should agree with the balance of the __________ account in the general ledger.
A. Purchases
B. Accounts Receivable
C. Accounts Payable
D. Sales

10) The amount of the purchases for a period is presented in the:
A. Liabilities section of the balance sheet.
B. Revenue section of the income statement.
C. Cost of Goods Sold section of the income statement.
D. Expenses section of the income statement.

11) A firm had purchases of $16,200, freight charges of $300, and purchases returns and allowances of $1,100 during one month. Its net delivered cost of purchases was:
A. $14,800.
B. $17,600.
C. $16,200.
D. $15,400.

12) In a firm that uses special journals, the return of damaged merchandise to a supplier and receipt of a credit memorandum is recorded in the __________ journal.
A. cash payments
B. cash receipts
C. purchases
D. general

13) When the sales department needs goods, it sends the purchasing department a form called a:
A. purchase invoice.
B. purchase order.
C. purchase requisition.
D. sales invoice.

14) Credit purchases of supplies that are to be used in the business are entered in the __________ journal.
A. purchases
B. general
C. cash payments
D. cash receipts

15) After a supplier of merchandise is selected, the purchasing department issues a form called a:
A. purchase invoice.
B. purchase order.
C. sale invoice.
D. purchase requisition.

16) Which of the following statements is correct?
A. Freight In is subtracted from Purchases to arrive at delivered cost of purchases.
B. Another name that may be used for the Freight In account is "Transportation In."
C. Freight charges that are listed on the invoice received from a supplier are not part of the total credit to Accounts Payable to record the credit purchase.
D. None of these statements is correct

17) Which of the following accounts is a contra cost of goods sold account?
A. Accounts Payable
B. Cash
C. Purchases
D. Purchases returns and allowances

18) The account of a creditor in the accounts payable ledger had a balance at the beginning of the month of $3,000. During the month total postings to the account from the purchases journal were $500. Also, there was a posting of $300 to the account from the general journal for a purchase return. The balance of the creditor account at the end of the month would be:
A. $2,200.
B. $2,800.
C. $3,000.
D. $3,200.

19) Which of the following represents a bill received for goods purchased?
A. Purchase invoice
B. Purchase order
C. Purchase requisition
D. Purchases journal

20) Which of the following credit terms is offering the customer a 3% cash discount if payment is made within 5 days of the invoice date?
A. 1/5, n/30
B. 5/3, n/EOM
C. 3/5, n/45
D. 5/1, n/3