E8-8.
(Purchases Recorded, Gross Method)
(LO 2) Cruise Industries purchased $10,800 of merchandise on February 1, 2017, subject to a trade discount of 10% and with credit terms of 3/15, n/60. It returned $2,500 (gross price before trade or cash discount) on February 4. The invoice was paid on February 13.
Instructions
(a) Assuming that Cruise uses the perpetual method for recording merchandise transactions, record the purchase, return, and payment using the gross method.
(b) Assuming that Cruise uses the periodic method for recording merchandise transactions, record the purchase, return, and payment using the gross method.
(c) At what amount would the purchase on February 1 be recorded if the net method were used?
In: Accounting
The following spreadsheet contains monthly returns for Cola Co. and Gas Co. for 2013. Using these data, estimate the average monthly return and the volatility for each stock. Month Cola Co. Gas Co.
January negative 1.80% 8.20%
February negative 3.70% negative 4.60%
March negative 0.05% 5.50%
April negative 1.20% 1.90%
May 1.90% negative 1.00%
June 1.90% 4.90%
July 0.60% negative 2.70%
August negative 2.10% negative 6.00%
September 4.10% 4.50%
October negative 2.40% 1.70%
November negative 8.60% negative 3.70%
December negative 2.50% 4.80%
The average monthly return for Cola Co. is negative 1.15%. (Round to two decimal places.)
The average monthly return for Gas Co. is 1.13%. (Round to two decimal places.)
The volatility for Cola Co. is __%. (Round to two decimal places.)
The volatility for Gas Co. is __%. (Round to two decimal places.)
In: Finance
Create shell in C which meets the requirements below:
1. The shell must support the following internal commands:
i.
cd - Change the current default directory to
If the argument is not present, report the current directory. If the directory does not exist an appropriate error
should be reported. This command should also change the
PWD environment variable.
ii. clr - Clear the screen.
iii. dir - List the contents of directory.
iv.
environ - List all the environment strings.
v. echo - Display on the display followed by a newline (multiple spaces/tabs may be reduced to a single space).
vi. help - Display the user manual using the more filter.
vii. pause - Pause operation of the shell until 'Enter' is pressed.
viii.
quit - Quit the shell.
ix.
The shell environment should contain shell=/myshell where
/myshell is the full path for the shell executable (not a
the hardwired path back to your directory, but the one from which it was executed).
In: Computer Science
Entity A is a listed company that operates the cruise ship business. One of the cruise ships was purchased on 1 Oct 2011. This cruise ship is made up of three main components: (1) cruise’s fabric, (2) cabins and entertainment area and (3) fittings propulsion system.
Details of the cost of its components and their estimated useful lives are as below:
Components Original cost Depreciation basis
(1) Cruise’s fabric (hull, decks, etc.) HK$37,500,000 50 years straight-line
(2) Cabins and entertainment area fittings HK$18,750,000 15 years straight-line
(3) Propulsion system HK$12,500,000 useful life of 80,000 hours
On 30 Sep 2019, no further capital expenditure had been incurred on the cruise ship.
In the year ended 30 Sep 2019, the cruise had experienced a high level of engine trouble, which had cost Entity A considerable revenue loss and compensation costs. The measured expired life of the propulsion system on 30 Sep 2019 was 50,000 hours. Due to the unreliability of the engines, a decision was made by Entity A on 1 Oct 2019 to replace the whole of the propulsion system at a cost of HK$17,500,000. The old propulsion system was also sold to a second-hand machinery shop with a loss on disposal of $4,250,000. The cash from the disposal was received on 20 Oct 2019. The expected life of the new propulsion system was 160,000 hours and in the year ended 30 Sep 2020, the cruise had used its engines for 10,000 hours.
At the same time as the propulsion system replacement, Entity A took this opportunity to upgrade the cabin and entertainment facilities at a cost of HK$7,500,000 and repaint the cruise’s fabric at a cost of HK$2,500,000 respectively. After the upgrade of the cabin and entertainment area fittings, it was estimated that their remaining useful life was 10 years.
For calculating depreciation, all the works on the cruise can be assumed to have been completed on 1 Oct 2019. All residual values can be taken as NIL.
REQUIRED:
(1) Measure the depreciation expense of the Cruise’s Fabric for the year ended 30 Sep 2020.
Answer = $
(2) Measure the depreciation expense of the Cabins and entertainment area fittings for the year ended 30 Sep 2020.
Answer = $
(3) Measure the depreciation expense of the Propulsion system for the year ended 30 Sep 2020.
Answer = $
(4) Measure the carrying amount of the Cruise’s Fabric on 30 Sep 2020.
Answer = $
(5) Measure the carrying amount of the Cabins and entertainment area fittings on 30 Sep 2020.
Answer = $
(6) Measure the carrying amount of the Propulsion system on 30 Sep 2020.
Answer = $
(7) Measure the carrying amount of Entity A’s cruise ship on 30 Sep 2020.
Answer = $
(8) Measure the cash received from the sale of the old propulsion system.
Answer = $
In: Accounting
Ubuntu Linux
HW5: text processing; scripting
1. Write a Linux command to rewrite the /var/passwd file to have a tab for each delimiter ':'. Hint: use tr
2. Write a Linux command to extract the user names and sort them. Hint: use cut
3. Write a for loop to to display a time table, e.g., 17 x 1 = 17; 17 x 2 = 34; etc., as follows:
17 x 1 = 17 17 x 2 = 34
17 x 3 = 51 17 x 4 = 68
17 x 5 = 85 17 x 6 = 102
17 x 7 = 119 17 x 8 = 136
17 x 9 = 153 17 x 10 = 170
17 x 11 = 187 17 x 12 = 204
17 x 13 = 221 17 x 14 = 238
17 x 15 = 255 17 x 16 = 272
17 x 17 = 289 4.
Write a Linux command to download the following webpage to the fail called "viral-diseases" Hint: use wget
5. Using a regular expression, write a Linux command to extract URL addresses from the viral-diseases. The URL starts with "www" and ending with "com" or "gov". Hint: use grep -E 6. Write a bash shell to
1) using a for loop to create the directory called "jyoon_0" to "jyoon_9";
2) change directory to each of the directories created,
3) write the sentence "Yoon visited in directory jyoon_0t" in the file jyoon_0.txt",
4) attach the timestamp to the file;
5) writhe the same sentence to the standard output device,
6) the timestamp too;
7) do this to all those 10 directories, and
8) at the end, write "All done" to the standard output device. So, the example standard output:
jyoon@MT-UBUN01:~$ ./hw5create.sh
Yoon visited jyoon_0 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_1 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_2 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_3 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_4 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_5 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_6 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_7 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_8 directory
Thu 09 Jul 2020 11:48:42 AM EDT
Yoon visited jyoon_9 directory
Thu 09 Jul 2020 11:48:42 AM EDT
All Created!
One of the directories has the following:
jyoon@MT-UBUN01:~$ cd jyoon_5
jyoon@MT-UBUN01:~/jyoon_5$ ls
jyoon_5.txt jyoon@MT-UBUN01:~/jyoon_5$ cat jyoon_5.txt
Yoon visited jyoon_5 directory
Thu 09 Jul 2020 11:48:42 AM EDT
jyoon@MT-UBUN01:~/jyoon_5$
Note that the directory name, file name and your name should be formed with your login ID, but not jyoon, which is not yours!
In: Computer Science
Lemon Co. sells $1,000,000 of 10% bonds on August 1, 2017. The bonds pay interest on February 1 and August 1. The due date of the bonds is August 1, 2020. The bonds yield 12%. On October 1, 2018, Lemon Co. buys back $200,000 worth of bonds for $218,000 (includes accrued interest). Give entries through October 1, 2018
| What is the present value of the bond at the date of issuance? | |||||
| What is the amount of interest expense as of 12/31/17? | |||||
| What is the amount of interest expense as of 2/1/18? | |||||
| What is the amount of interest expense as of 8/1/18? | |||||
| What is the amount of interest expense as of 10/1/18 for | |||||
| the bonds reacquired? | |||||
| What is the loss on the bonds reacquired at 10/1/18? | |||||
In: Accounting
UNIX/LINUX SCRIPT:
Create a named directory and verify that the directory is there by listing all its contents.
Write a shell script to validate password strength. Here are a few assumptions for the password string.
Length – a minimum of 8 characters.
• Contain alphabets , numbers , and @ # $ % & * symbols.
• Include both the small and capital case letters.
give a prompt of Y or N to try another password and displays an error if anything other than an N or Y is entered.
-If the password doesn’t comply to any of the above conditions, then the script should report it as a “Weak Password” otherwise display a “Strong Password”
If the password is Strong then the strong password will be added to a separate file named password.txt
and lastly display their contents of the password file, then delete the file and the directory and verify both are deleted.
In: Computer Science
Write a program in c++ that maintains a telephone directory. The Telephone directory keeps records of people’s names and the corresponding phone numbers.
The program should read a transaction file and report the result into an output file. The transaction file can include commands such as “Add”, “Delete”, “Display”, and “Update”, and “Search”. Each command is written in one line with a few other information.
The “Display” Command should simply display everyone in the directory on the screen
The “Add” command comes with 3 other information that includes “First Name”, “Last Name”, and “Phone Number”. You should only add this command if the phone number is unique and it is not assigned to any other person. Otherwise an error statement should be generated to indicate that “Duplicate phone number is not allowed”. If the addition of the record is successful, you need to report that in the output file as follows:
“First Name”, “Last Name”, “Phone Number” has been successfully added to the directory
If the addition fails, you should report that
“**** ERROR IN ADD **** “Phone Number” already exist in the directory
The “Delete” command comes with the “Phone Number” indicating that this record should be deleted from the directory. You should only delete the record if you can find the phone number. If you could remove the record from the directory, you should report:
“First Name”, “Last Name”, “Phone Number” has been successfully deleted from the directory
If the delete fails, you should report that
“**** ERROR IN DELETE **** “Phone Number” does exist in the directory
The “Update” command come with two values, “Phone Number” and “New Phone Number”. You program should first search for “Phone Number” and find out if such a phone number exist in the directory. If it does not find it, it should report:
“**** ERROR IN UPDATE **** The Phone Number does not exist in the directory
However, if it finds the phone number, there are two cases. If the “New Phone Number” already exists in the directory, it should report
“**** ERROR IN UPDATE **** The New Phone Number “New Phone Number” already exist in the directory.
If the “New Phone Number” does not exist in the directory, your program should replace the “Old Phone Number” with the “New Phone Number” and report
The Phone Number “Old Phone Number” is successfully updated to “New Phone Number”
There are two types of “Search” commands. One is done based on the last name and another is done based on the phone number. If it is done based on the last name, the search command can be as follows:
Search BasedOnLastName “LastName”
In this case the search is done based on the last name. Your program should search for all records with that last name and report them on the screen. If the search fails your report should have the following format
“**** ERROR IN SEARCH **** No Record with the last name “Last Name” could be found”
If the search is done based on the phone number, the command should be
Search BasedOnPhoneNumber “PhoneNumber”
In this case the search is done based on the Phone Number. Your program should search for the specific record with that phone number and if it finds it, it should report it
FirstName LastName PhoneNumber is found
on the screen; otherwise, it should display
“**** ERROR IN SEARCH ****: No Record with the phone number “Phone Number” Exist
You are required to create a vector with class called PhoneRecords.
class PhoneRecords
{
Public:
string Fname;
string Lname;
string PhoneNumber;
};
Every time a record is added it should be added to vector. You can simply use the “push_back” operation to add it to the end of the vector. Use the following Transaction file to do run your work.
Add Joe Garcia 858-343-2009
Add Amelia Perez 617-255-0987
Add Bob Haynes 858-765-1122
Add Tim Ducrest 760-877-1654
Add Kevin Garcia 760-543-5622
Add Suzy Walter 858-190-2307
Add Fang Yi 619-677-1212
Add Robert James 619-909-3476
Add Mary Palmer 760-435-2086
Delete 760-888-1237
Delete 760-877-1654
Add Kevin Garcia 760-543-5622
Add Robert James 619-909-3476
Search BasedOnLastName Garcia
Search BasedOnLastName Wong
Search BasedOnPhoneNumber 760-977-2654
Search BasedOnPhoneNumber 858-190-2307
Update 858-343-2119 760-877-1654
Update 617-255-0987 760-435-2086
Update 858-765-1122 800-134-2765
Display
Your output file should look like as follows:
(Joe Garcia 858-343-2009) has been successfully added to the directory
(Amelia Perez 617-255-0987) has been successfully added to the directory
(Bob Haynes 858-765-1122) has been successfully added to the directory
(Tim Ducrest 760-877-1654) has been successfully added to the directory
(Kevin Garcia 760-543-5622) has been successfully added to the directory
(Suzy Walter 858-190-2307) has been successfully added to the directory
(Fang Yi 619-677-1212) has been successfully added to the directory
(Robert James 619-909-3476) has been successfully added to the directory
(Mary Palmer 760-435-2086) has been successfully added to the directory
**** ERROR IN DELETE **** “760-888-1237” does not exist in the directory
(Tim Ducrest 760-877-1654) has been successfully deleted from the directory
**** ERROR IN ADD **** “760-543-5622” already exist in the directory
Joe Garcia 858-343-2009
Kevin Garcia 760-543-5622
**** ERROR IN SEARCH **** No Record with the last name “Wong” could be found
“**** ERROR IN SEARCH ****: No Record with the phone number “760-977-2654” Exist
(Suzy Walter 858-190-2307) is found
**** ERROR IN UPDATE **** The Phone Number 858-343-2119 does exist in the directory
“**** ERROR IN UPDATE **** The New Phone Number “760-435-2086” already exist in the directory
The Phone Number “858-765-1122” is successfully updated to “800-134-2765”
Joe Garcia 858-343-2009
Amelia Perez 617-255-0987
Bob Haynes 800-134-2765
Kevin Garcia 760-543-5622
Suzy Walter 858-190-2307
Fang Yi 619-677-1212
Robert James 619-909-3476
Mary Palmer 760-435-2086
Kevin Garcia 760-543-5622
Robert James 619-909-3476
Place the result into a file called “Output.txt”.
//-----------------------please use the following outline to complete program, show output at the end to make sure program works-----------------------------
#include
#include
#include
#include
using namespace std;
class phoneRecords
{
private:
string firstName;
string lastName;
string phoneNumber;
public:
phoneRecords();
{
firstName = lastName = phoneNumber = " ";
}
phoneRecords(string Fn, string Ln, string Phone);
{
firstName = Fn;
lastName = Ln;
phoneNumber = Phone;
}
};
class TelephoneDirectory
{
private:
ifstream fin;
vector phones;
bool success;
bool failure;
public:
TelephoneDirectory();
{
success = true;
failure = false;
};
bool AddAphone(string firstName,string lastName,string phoneNumber);
bool Remove(string phoneNumber);
bool Update(string oldPhone,string newPhone);
bool SearchBasedOnLastName(string lastName);
bool SearchBasedOnPhoneNumber(string phoneNumber);
bool DisplayRecords();
bool InvokeTransFile();
//--------------------------------------------------------------------
bool TelephoneDirectory::AddAphone(string firstName,string lastName,string phoneNumber)
{
bool status = SearchBasedOnPhoneNumber(phoneNumber);
if(status == false)
{
cout << **ERROR** << endl;
return false;
}
phoneRecords newPerson(Fn, Ln, Phone);
phones.push_back(newPerson);
return success;
}
//--------------------------------------------------------------------
bool TelephoneDirectory::Remove(string phoneNumber)
{
return success;
}
//--------------------------------------------------------------------
bool TelephoneDirectory::Update(string oldPhone,string newPhone)
{
return success;
}
//--------------------------------------------------------------------
bool TelephoneDirectory::SearchBasedOnLastName(string lastName)
{
return success;
}
//--------------------------------------------------------------------
bool TelephoneDirectory::SearchBasedOnPhoneNumber(string phoneNumber)
{
}
//--------------------------------------------------------------------
bool TelephoneDirectory::DisplayRecords()
{
return success;
}
//--------------------------------------------------------------------
bool TelephoneDirectory::InvokeTransFile()
{
return success;
}
//--------------------------------------------------------------------
int main()
{
TelephoneDirectory SanMarcosPhone;
SanMarcosPhone.InvokeTransFile();
return 0;
}
In: Computer Science
In: Finance
In: Economics