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 |
||
|
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 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 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
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++
In: Computer Science
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 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 Thomas, garage proprietor, the balance at bank according to the cash book was RM894.68 in hand.
Subsequently the following discoveries were made:
Required:
In: Accounting
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
In: Economics