Questions
Bonds that are subject to retirement at a stated dollar amount prior to maturity at the...

Bonds that are subject to retirement at a stated dollar amount prior to maturity at the option of the issuer are called

a. callable bonds.

b. early retirement bonds.

c. options.

d. debentures.

If the market interest rate is 5%, a $10,000, 6%, 10-year bond that pays interest annually would sell at an amount

a. less than face value.

b. equal to face value.

c. greater than face value.

d. that cannot be determined.

Horton Company purchased a building on July 1 by signing a long-term $480,000 mortgage with monthly payments of $4,400. The mortgage carries an interest rate of 10%. The amount owed on the mortgage after the first payment will be

a. $480,000.

b. $479,600.

c. $476,000.

d. $475,600.

The 2017 financial statements of Marker Co. contain the following selected data (in millions).

                  Current Assets

$ 75

                  Total Assets

140

                  Current Liabilities

40

                  Total Liabilities

90

                  Cash 8

The debt to assets ratio is

a. 64.3%.

b. 53.3%.

c. 28.6%.

d. 147.4%.

In: Accounting

16-20 Any balance in an unearned revenue account is reported as a(n) current liability long-term debt...

16-20

Any balance in an unearned revenue account is reported as a(n)

current liability

long-term debt

revenue

unearned liability

If stock is issued for less than par value, the account

Paid-In Capital in Excess of Par Value is credited.

Paid-In Capital in Excess of Par Value is debited if a debit balance exists in the account

Paid-In Capital in Excess of Par Value is debited if a credit balance exists in the account.

Retained Earnings is credited

On October 1, Jerry's Carpet Service borrows $250,000 from First National Bank on a 3-month, $250,000, 8% note. The entry by Jerry's Carpet Service to record payment of the note and accrued interest on January 1 is

Notes Payable debit 255,000 Cash credit 255,000

Notes Payable debit 250,000 Interest Payable debit 5,000 Cash credit 255,000

Notes Payable debit 250,000 Interest Payable debit 20,000 Cash credit 270,000

Notes Payable debit 250,000 Interest Expense debit 5,000 Cash credit 255,000

On January 31, Exploration Co. reaquired 22,500 shares of its common stock at $31 per share. On April 20, the company sold 12,800 of the reacquired shares at $40 per share. On October 4, the company sold the remaining shares at $28 per share. What is the journal entry for October 4?

Debit cash 270,400; Debit Paid in capital treasury stock $29,100; Credit treasury stock 299,500.

Debit cash 271,600; Debit Paid in capital treasury stock $29,100; Credit treasury stock 300,700.

Debit cash 512,000; Credit Paid in capital treasury stock $396,800; Credit treasury stock $115,200.

Debit cash 697,500; Credit Paid in capital treasury stock $115,200; Credit treasury stock $582,300.

A stock split is a process by which a corporation reduces the par or stated value of its common stock and issues a proprotionate numer of additional shares.

True

False

In: Accounting

Object-Oriented Design and Patterns in Java (the 3rd Edition Chapter 5) - Create a directory named...

Object-Oriented Design and Patterns in Java (the 3rd Edition Chapter 5)

- Create a directory named as the question number and save the required solutions in the directory.

- Each problem comes with an expected tester name. In the directory for a given problem, including the tester and all java classes successfully run this tester.

Exercise 5.2

ObserverTester.java - Improve Exercise 1 by making the graph view editable. Attach a mouse listener to the panel that paints the graph. When the user clicks on a point, move the nearest data point to the mouse click. Then update the model and ensure that both the number view and the graph view are notified of the change so that they can refresh their contents. Hint: Look up the API documentation for the MouseListener interface type. In your listener, you need to take action in the mousePressed method. Implement the remaining methods of the interface type to do nothing.

Exercise 1 is below.

-----------------------------------------------------------------------------------

BarFrame.java

import java.awt.*;
import java.awt.geom.*;
import javax.swing.*;
import javax.swing.event.*;
import java.util.*;

/**
  A class that implements an Observer object that displays a barchart view of
  a data model.
*/
public class BarFrame extends JFrame implements ChangeListener
{
   /**
      Constructs a BarFrame object
      @param dataModel the data that is displayed in the barchart
   */
   public BarFrame(DataModel dataModel)
   {
      this.dataModel = dataModel;
      a = dataModel.getData();

      setLocation(0,200);
      setLayout(new BorderLayout());

      Icon barIcon = new Icon()
      {
         public int getIconWidth() { return ICON_WIDTH; }
         public int getIconHeight() { return ICON_HEIGHT; }
         public void paintIcon(Component c, Graphics g, int x, int y)
         {
            Graphics2D g2 = (Graphics2D) g;

            g2.setColor(Color.red);

            double max =  (a.get(0)).doubleValue();
            for (Double v : a)
            {
               double val = v.doubleValue();
               if (val > max)
                  max = val;
            }

            double barHeight = getIconHeight() / a.size();

            int i = 0;
            for (Double v : a)
            {
               double value = v.doubleValue();

               double barLength = getIconWidth() * value / max;

               Rectangle2D.Double rectangle = new Rectangle2D.Double
                  (0, barHeight * i, barLength, barHeight);
               i++;
               g2.fill(rectangle);
            }
         }
      };

      add(new JLabel(barIcon));

      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      pack();
      setVisible(true);
   }

   /**
      Called when the data in the model is changed.
      @param e the event representing the change
   */
   public void stateChanged(ChangeEvent e)
   {
      a = dataModel.getData();
      repaint();
   }

   private ArrayList<Double> a;
   private DataModel dataModel;

   private static final int ICON_WIDTH = 200;
   private static final int ICON_HEIGHT = 200;
}

-----------------------------------------------------------------------------------

DataModel.java

import java.util.ArrayList;
import javax.swing.event.*;

/**
  A Subject class for the observer pattern.
*/
public class DataModel
{
   /**
      Constructs a DataModel object
      @param d the data to model
   */
   public DataModel(ArrayList<Double> d)
   {
      data = d;
      listeners = new ArrayList<ChangeListener>();
   }

   /**
      Constructs a DataModel object
      @return the data in an ArrayList
   */
   public ArrayList<Double> getData()
   {
      return (ArrayList<Double>) (data.clone());
   }

   /**
      Attach a listener to the Model
      @param c the listener
   */
   public void attach(ChangeListener c)
   {
      listeners.add(c);
   }

   /**
      Change the data in the model at a particular location
      @param location the index of the field to change
      @param value the new value
   */
   public void update(int location, double value)
   {
      data.set(location, new Double(value));
      for (ChangeListener l : listeners)
      {
         l.stateChanged(new ChangeEvent(this));
      }
   }

   ArrayList<Double> data;
   ArrayList<ChangeListener> listeners;
}

-----------------------------------------------------------------------------------

TextFrame.java

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.util.ArrayList;

/**
  A class for displaying the model as a column of textfields in a frame.
*/
public class TextFrame extends JFrame
{
   /**
      Constructs a JFrame that contains the textfields containing the data
      in the model.
      @param d the model to display
   */
   public TextFrame(DataModel d)
   {
      dataModel = d;

      final Container contentPane = this.getContentPane();
      setLayout(new BoxLayout(contentPane, BoxLayout.Y_AXIS));

      ArrayList<Double> a = dataModel.getData();
      fieldList = new JTextField[a.size()];

      // A listener for action events in the text fields
      ActionListener l = new ActionListener()
      {
         public void actionPerformed(ActionEvent e)
         {
            // Figure out which field generated the event
            JTextField c = (JTextField) e.getSource();
            int i = 0;
            int count = fieldList.length;
            while (i < count && fieldList[i] != c)
               i++;

            String text = c.getText().trim();

            try
            {
               double value = Double.parseDouble(text);
               dataModel.update(i, value);
            }
            catch (Exception exc)
            {
               c.setText("Error.  No update");
            }
         }
      };

      final int FIELD_WIDTH = 11;
      for (int i = 0; i < a.size(); i++)
      {
         JTextField textField = new JTextField(a.get(i).toString(),FIELD_WIDTH);
         textField.addActionListener(l);
         add(textField);
         fieldList[i] = textField;
      }

      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      pack();
      setVisible(true);
   }

   DataModel dataModel;
   JTextField[] fieldList;
}

-----------------------------------------------------------------------------------

ObserverTester.java

import java.util.ArrayList;

/**
   A class for testing an implementation of the Observer pattern.
*/
public class ObserverTester
{
   /**
      Creates a DataModel and attaches barchart and textfield listeners
      @param args unused
   */
   public static void main(String[] args)
   {
      ArrayList<Double> data = new ArrayList<Double>();

      data.add(new Double(33.0));
      data.add(new Double(44.0));
      data.add(new Double(22.0));
      data.add(new Double(22.0));

      DataModel model = new DataModel(data);

      TextFrame frame = new TextFrame(model);

      BarFrame barFrame = new BarFrame(model);

      model.attach(barFrame);
   }
}

In: Computer Science

PYTHON - You are given a data.csv file in the /root/customers/ directory containing information about your...

PYTHON - You are given a data.csv file in the /root/customers/ directory containing information about your customers. It has the following columns: ID,NAME,CITY,COUNTRY,CPERSON,EMPLCNT,CONTRCNT,CONTRCOST where ID: Unique id of the customer NAME: Official customer company name CITY: Location city name COUNTRY: Location country name CPERSON: Email of the customer company contact person EMPLCNT: Customer company employees number CONTRCNT: Number of contracts signed with the customer CONTRCOST: Total amount of money paid by customer (float in format dollars.cents) Read and analyze the data.csv file, and output the answers to these questions: How many total customers are in this data set? How many customers are in each city? How many customers are in each country? Which country has the largest number of customers' contracts signed in it? How many contracts does it have? How many unique cities have at least one customer in them? The answers should be formatted as: Total customers: Customers by city: : : ... Customers by country: : : ... Country with most customers' contracts: USA ( contracts) Unique cities with at least one customer: The answers for Customers by city and Customers by country must be sorted by CITY and COUNTRY respectively, in ascending order. If there are several cities that are tied for having the most customers' contracts, print the lexicographically bigger one.

In: Computer Science

Copy d_state.h to your working directory and finish its implementation. Write a program: it first declares...

  1. Copy d_state.h to your working directory and finish its implementation.
  2. Write a program:
    • it first declares a set object s having 5 elements of type stateCity with its initial values such as ("Virginia", "Richmond");
    • then perform the search: input the name of a state, and use the find() function to determine where the state in the set. If the object is present, used the << operator to output the sate and the city; if it is not present, output a message to that effect.
    • Then, rather than using objects of type stateCity, you will implement the program by using a map with state name (string) as the key and the city name (string) as the data value.

d_state.h:

#ifndef STATECITY_CLASS
#define STATECITY_CLASS

#include 
#include 

using namespace std;

// object stores the state name and city in the state
class stateCity
{
        public:
                stateCity (const string& name = "", const string& city = "");

                // output the state and city name in the format
                //    cityName, stateName
                friend ostream& operator<< (ostream& ostr, const stateCity& state;
                
                // operators < and == must be defined to use with set object.
                // operators use only the stateName as the key
                friend bool operator< (const stateCity& a, const stateCity& b);
                
                friend bool operator== (const stateCity& a, const stateCity& b);
        
        private:
                string stateName, cityName;
};

#endif  // STATECITY_CLASS

Please write in C++



Sample Output:

Run 1:

Enter a state: Arizona
Phoenix, Arizona

Run 2:

Enter a state: New York
New York is not in the set

In: Computer Science

Complete these steps to write a simple calculator program: 1. Create a calc project directory 2....

Complete these steps to write a simple calculator program:

1. Create a calc project directory

2. Create a mcalc.c source file containing five functions; add, sub, mul, div, and mod; that implement integer addition, subtraction, multiplication, division, and modulo (remainder of division) respectively. Each function should take two integer arguments and return an integer result.

3. Create a mcalc.h header file that contains function prototypes for each of the five functions implemented in mcalc.c.

4. Create a calc.c source file with a single main function that implements a simple calculator program with the following behavior:

-> Accepts a line of input on stdin of the form ”number operator number” where number is a signed decimal integer, and operator is one of the characters ”+”, ”-”, ”*”, ”/”, or ”%” that corresponds to the integer addition, subtraction, multiplication, division, and modulo operation respectively.

-> Performs the corresponding operation on the two input numbers using the five mcalc.c functions.

-> Displays the signed decimal integer result on a separate line and loops to accept another line of input.

-> Or, for any invalid input, immediately terminates the program with exit status 0.

5. Create a Makefile using the following Makefile below as a starting point. Modify the Makefile so that it builds the executable calc as the default target. The Makefile should also properly represent the dependencies of calc.o and mcalc.o.

CC = gcc
CFLAGS = -g -O2 -Wall -Werror
ASFLAGS = -g

objects = calc.o mcalc.o

default: calc

.PHONY: default clean clobber

calc: $(objects)
   $(CC) -g -o $@ $^

calc.o: calc.c mcalc.h


%.o: %.c
   $(CC) -c $(CFLAGS) -o $@ $<

%.o: %.s
   $(CC) -c $(ASFLAGS) -o $@ $<

clean:
   rm -f $(objects)

clobber: clean
   rm -f calc

6. Compile the calc program by executing ”make” and verify that the output is proper. For example:

# ./calc

3 + 5

8

6 * 7

42

In: Computer Science

(python please) The Cache Directory (Hash Table):The class Cache()is the data structure you will use to...

(python please)

The Cache Directory (Hash Table):The class Cache()is the data structure you will use to store the three other caches (L1, L2, L3). It stores anarray of 3 CacheLists, which are the linked list implementations of the cache (which will be explained later). Each CacheList has been already initialized to a size of 200. Do not change this. There are 3 functions you must implement yourself:

•def hashFunc(self, contentHeader)oThis function determines which cache level your content should go in. Create a hash function that sums the ASCII values of each content header, takes the modulus of that sum with the size of the Cache hash table, and accordingly assigns an index for that content –corresponding to the L1, L2, or L3 cache. So, for example, let’sassume the header “Content-Type: 2”sumsto an ASCII value of 1334. 1334% 3 = 2. So, that content would go in the L3cache. You should notice a very obvious pattern in which contentheaders correspond to which caches. The hash function should be used by your insert and retrieveContent functions.

•def insert(self, content, evictionPolicy)oOnce a content object is created, call the cache directory’s insert function to insert it into the proper cache. This function should call the linked list’s implementation of the insert function to actually insert into the cache itself. The eviction policywill be a string –either ‘lru’or ‘mru’. These eviction policies will be explained later. oThis function should return a message including the attributes of the content object inserted into the cache. This is shown in the doctests.

•def retrieveContent(self, content)oThis function should take a content object, determine which level it is in, and then return the object if it is in the cache at that level. If not, it should return a message indicating that it was not found. This is known as a “cache miss”. Accordingly, finding content in a cache is known as a “cache hit”. The doctests show the format of the return statements.

In: Computer Science

QUESTION 2 (BANK RECONCILIATION) In the draft accounts for the year ended 31 October 2019 of...

QUESTION 2 (BANK RECONCILIATION)

In the draft accounts for the year ended 31 October 2019 of Thomas, garage proprietor, the balance at bank according to the cash book was RM894.68 in hand.

Subsequently the following discoveries were made:

  1. Cheque number 176276 dated 3 September 2019 for RM310.84 in favour of Gene Sdn Bhd has been correctly recorded in the bank statement, but included in the cash book payments as RM301.84.
  2. Bank commission charged of RM169.56 and bank interest charged of RM109.10 have been entered in the bank statement on 23 October 2019, but not included in the cash book.
  3. The recently received bank statement shows that a cheque for RM29.31 received from Andrews and credited in the bank statements on 9 October 2019 has now been dishonoured and debited in the bank statement on 26 October 2019. The only entry in the cash book for this cheque records its receipt on 8 October 2019.
  4. Cheque number 177145 for RM15.10 has been recorded twice as a credit in the cash book.
  5. Amounts received in the last few days of October 2019 totalling RM1,895.60 and recorded in the cash book have not been included in the bank statements until 2 November 2019.
  6. Cheques paid according to the cash book during October 2019 and totalling RM395.80 were not presented for payment to the bank until November 2019.
  7. Traders' credits totalling RM210.10 have been credited in the bank statement on 26 October 2019, but not yet recorded in the cash book.
  8. A standing order payment of RM15.00 on 17 October 2019 to ABC Sdn Bhd has been recorded in the bank statement but is not mentioned in the cash book.

Required:

  1. Prepare a computation of the balance at bank to be included in Thomas's statement of financial position as at 31 October 2019.
  2. Prepare a bank reconciliation statement as at 31 October 2019 for Thomas.

In: Accounting

Nashville Publishing Company pays its employees monthly. Payments made by the company on October 31, 2019,...

Nashville Publishing Company pays its employees monthly. Payments made by the company on October 31, 2019, follow. Cumulative amounts paid to the persons named prior to October 31 are also given.

Paul Parker, president, gross monthly salary of $20,000; gross earnings prior to October 31, $160,000.

Carolyn Wells, vice president, gross monthly salary of $15,000; gross earnings paid prior to October 31, $150,000.

Michelle Clark, independent accountant who audits the company’s accounts and performs consulting services, $16,500; gross amounts paid prior to October 31, $42,500.

James Wu, treasurer, gross monthly salary of $6,000; gross earnings prior to October 31, $60,000.

Payment to Editorial Publishing Services for monthly services of Betty Jo Bradley, an editorial expert, $6,000; amount paid to Editorial Publishing Services prior to October 31, 2019, $34,000.


Required:

Use an earnings ceiling of $122,700 for social security taxes and a tax rate of 6.2 percent and a tax rate of 1.45 percent on all earnings for Medicare taxes. Prepare a schedule showing the following information:

Each employee’s cumulative earnings prior to October 31.

Each employee’s gross earnings for October.

The amounts to be withheld for each payroll tax from each employee’s earnings; the employee’s income tax withholdings are Paul Parker, $5,600; Carolyn Wells, $4,200; James Wu, $1,320.

The net amount due each employee.

The total gross earnings, the total of each payroll tax deduction, and the total net amount payable to employees.

Prepare the general journal entry to record the company’s payroll on October 31.

Prepare the general journal entry to record payments to employees on October 31.

In: Accounting

Create a frame/ structure of an introduction, thesis, support evidence, analysis, and proper content for the...

Create a frame/ structure of an introduction, thesis, support evidence, analysis, and proper content for the following question.

2. Discuss the post-WWII growth in the American middle class.

- What characterized the affluence of American society?
- What was the influence of the baby boomer generation?
- How did the civil rights movement reveal divisions in American society?

In: Economics