Questions
QUESTION Lemonade Bhd , a manufacturing company was incorporated two years ago. The following is the...

QUESTION

Lemonade Bhd , a manufacturing company was incorporated two years ago. The following is the statement of financial position of the company as at 31 December 2018.

Lemonade Bhd

Statement of financial position as at 31 December 2018

+

RM

Issued and paid up capital

5,000,000 Ordinary shares

10,000,000

1,000,000 7% Preference Shares

5,000,000

Reserves

Retained earnings

10,767,000

Non Current Liabilities

5% Debenture

10,000,000

Current Liabilities

Account payable

573,000

36,340,000

Financed by:

Non current asset

34,343,000

Investment

850,000

Current Assets

Inventory

250,000

Account receivables

657,000

Bank

240,000

36,340,000

During the year ended, the company resolved the following matters

  1. Bonus issue of one ordinary shares for every ten-share held were given to the shareholder.

  1. On 1st February the company issued 30,000,000 Ordinary shares at RM1.80. The application received were oversubscribed by 5,000,000 units. The applications monies in respect of the unsuccessful applications were returned to the applicants.

  1. The company also issued additional 2,000,000 unit of 7% Preference shares at RM 4 each. The shares undersubscribed by half.

  1. On 1st April 2019, 8% Debentures RM500,000 were issued . The effective interest rate is 9% and the issuance cost incurred is RM10, 000. The company decided to use amortised cost method in recognising the debentures.

  1. Investment costing RM600, 000 was sold at a gain of RM15, 000.

Required:

  1. Show journal entries to record the above transactions.

  1. Prepare updated statement of financial position as at 31 December 2019.

In: Accounting

Lemonade Bhd , a manufacturing company was incorporated two years ago. The following is the statement...

Lemonade Bhd , a manufacturing company was incorporated two years ago. The following is the statement of financial position of the company as at 31 December 2018.

Lemonade Bhd

Statement of financial position as at 31 December 2018

RM

Issued and paid up capital

5,000,000 Ordinary shares

10,000,000

1,000,000 7% Preference Shares

5,000,000

Reserves

Retained earnings

10,767,000

Non Current Liabilities

5% Debenture

10,000,000

Current Liabilities

Account payable

573,000

36,340,000

Financed by:

Non current asset

34,343,000

Investment

850,000

Current Assets

Inventory

250,000

Account receivables

657,000

Bank

240,000

36,340,000

During the year ended, the company resolved the following matters

  1. Bonus issue of one ordinary shares for every ten-share held were given to the shareholder.
  2. On 1st February the company issued 30,000,000 Ordinary shares at RM1.80. The application received were oversubscribed by 5,000,000 units. The applications monies in respect of the unsuccessful applications were returned to the applicants.
  3. The company also issued additional 2,000,000 unit of 7% Preference shares at RM 4 each. The shares undersubscribed by half.
  4. On 1st April 2019, 8% Debentures RM500,000 were issued . The effective interest rate is 9% and the issuance cost incurred is RM10, 000. The company decided to use amortised cost method in recognising the debentures.
  5. Investment costing RM600, 000 was sold at a gain of RM15, 000.

Required:

  1. Show journal entries to record the above transactions.
  2. Prepare updated statement of financial position as at 31 December 2019.

In: Accounting

Data Structures Use good style. Make sure that you properly separate code into .h/.cpp files. Make...

Data Structures

Use good style. Make sure that you properly separate code into .h/.cpp files. Make sure that you add preprocessor guards to the .h files to allow multiple #includes.

Overview

You will be writing the classes Grade and GradeCollection. You will be writing testing code for the Grade and GradeCollection classes.

Part 1 – Create a Grade Class

Write a class named Grade to store grade information.

Grade Class Specifications

  1. Include member variables for name (string), score (double).
  2. Write a default constructor.
  3. Write a constructor that takes values for all member variables as parameters.
  4. Write a copy constructor.
  5. Implement Get/Set methods for all member variables.
  6. Add a member overload for the assignment operator.
  7. Add a non-member operator<< overload. Prints the values of all member variables on the given ostream.  

Part 2 – Create a GradeCollection Class

Write a class that will store a collection of Grade. This class will be used to keep track of data for multiple grades. You MUST implement ALL of the specifications below.

GradeCollection Class Specifications

  1. Create a private member variable that is an array of Grade. The size of the array can be whatever you want it to be.
  2. Your class must implement all of the following functions (use the given function prototypes):
    1. Create a default constructor that will initialize all elements of the array to default values.
    2. void Set(int index, Grade g) – Sets the value at the given index to the given Grade. You should test the index to make sure that it is valid. If the index is not valid then do not set the value.
    3. Grade Get(int index) – Return the Grade located at element index of the array.
    4. int GradeCount(double lowerBound, double upperBound) – Returns the count of the number of grades in the given range. For example, assume the following scores: 60, 70, 65, 75, 80, 90

If lowerBound is 70 and upperBound is 80 then the returned value should be 3. Any values that fall on the boundaries should be included in the count.

  1. Grade LowestGrade() – Returns the grade with the lowest score in the array.
  2. bool FindGrade(string name, Grade &g) – Returns true if the grade with the given name is in the array and false otherwise. If the grade is in the array you should copy it into the Grade reference parameter.
  3. double GradeAverage() – Returns the average of all the grades in the collection
  4. int Size() – Returns the size of the array.
  5. void Initialize() – Initializes all of the elements of the array to reasonable default values.
  6. string GetAuthor() – Returns your name. Just hard code your name into the function.

Part 3 – Main Function

In main you should create instances of the Grade and GradeCollection classes and demonstrate that ALL functions work properly on both classes. You can write unit testing code if you want but you are not required to. Make sure you call ALL functions.

Part 4 – Comments

In addition to the normal comments, EVERY function that gets updated because of the required changes should have an update comment added to the function commenting header. The update comment should have your name, the date of the change, and a short description of the change. For example:

//****************************************************

// Function: SetName

//

// Purpose: Sets the name of the grade.

//

// Update Information

// ------------------

//

// Name:

// Date: 9/20/2016

// Description: mName member variable was changed to a

//              pointer. Updated code so that it works //              with a pointer.

//

//****************************************************

Part 5 – Updated Grade and GradeCollection Classes

Grade Class Updates

The Grade class should implement all the specifications from the first assignment plus the updates and features listed below.

  1. Change all member variables to pointers. You will need to update code in any functions that use these member variables. Do NOT change any function signatures for this class. For example, assume the get/set functions have the following signatures:

std::string GetName(); void SetName(std::string name);

These signatures should remain exactly the same. The same goes for any other functions that use these member variables. Only the internal implementation of the functions will change to accommodate the use of pointers.

  1. Update the constructors. The constructors should allocate memory for the pointer member variables.
  2. Add a destructor. The destructor should deallocate memory for the pointer member variables.
  3. Update operator= and copy constructor. The operator= and copy constructor should be updated to perform deep copies.
  4. Add a non-member operator>> overload. The >> operator is used for input. Reads the values of all member variables from the given istream.

GradeCollection Class Updates

The GradeCollection class should implement all the specifications from the first assignment plus the updates and features listed below.

  1. Dynamic array. Change the internal implementation of the array so that the array is dynamically allocated.
  2. Add a size member variable to the class. This member variable should ALWAYS contain the number of elements in the array (size of the array). Some functions may cause the size of the array to change so make sure that this member variable is updated to reflect the new size.
  3. Update all the necessary code in the class so that it is usable with a dynamic array. One example of this is to change the ending condition of loops that visit all elements of the array should not be hard coded. They should use the new size variable as the ending condition.
  4. Add a one parameter constructor that takes a size. This constructor should dynamically allocate an array of the given size. It should also set the size member variable to reflect the size.
  5. Add a copy constructor. This function should make a deep copy of the passed in instance.
  6. Add a destructor. This function should perform any necessary cleanup.
  7. Add a member overload of operator= (assignment operator). This method should perform a deep copy of the passed in instance. After this function ends the size of the current instance’s array should be the same as the other instance’s array and all the data from the other instance should be copied into the current instance’s array. Hint: C++ arrays have a fixed size. You may need to delete and then reallocate memory for the current instance’s array in order to make the current instance’s array the same size as the other instance’s array. Be careful for memory leaks.
  8. Add a non-member operator<< overload. Prints the values of all elements of the array on the given ostream.
  9. Add a Resize function. Here is the function signature: void Resize(int newSize);

This function should create a new array that has the passed in size. You MUST retain any values that were previously in the array. The new array size can be larger or smaller. If the new array size is SMALLER just retain as many elements from the previous array that can fit.

Hint: C++ arrays have a fixed size. You may need to delete and then reallocate memory. Be careful for memory leaks.

  1. Add a function named Clone with the following signature:

GradeCollection *Clone();

This function should allocate a new dynamic instance of GradeCollection that is a deep copy of the current instance. This method should return a pointer to the new instance.

Hint: Any function that calls Clone is responsible for releasing the returned memory address.

Part 6 – Main Function

In main you should create instances of the updated Grade and GradeCollection classes and demonstrate that ALL functions work properly. You can write unit testing code if you want but you are not required to. Make sure you call ALL functions.

You program should not have memory leaks.

In: Computer Science

Two aeroplanes with the same specification each that has an engine rotates at 2000 rpm with...

Two aeroplanes with the same specification each that has an engine rotates at 2000 rpm with the moment of inertia for all rotating parts is 420 (kg)(m^2). The engine rotates anti-clockwise when viewed from the front. One of the aeroplanes turn to the left and the other turn to the right. Compare the magnitude and effect of the gyroscopic action resulting on the plane if the turning radius is 2000 m at a speed of 2000 km/h.

In: Mechanical Engineering

what is super key,  candidate key, and primary key, and foreign key in terms of database? and...

what is super key,  candidate key, and primary key, and foreign key in terms of database? and plz provide some examples, thanks.

In: Computer Science

Using PHP and MYSQL and with a simple customer database, how can I create a simple...

Using PHP and MYSQL and with a simple customer database, how can I create a simple log in and registration system for an ecommerce site

In: Computer Science

Describe the structure of codification. Codification of accounting standards reduces the time and effort of researching...

Describe the structure of codification. Codification of accounting standards reduces the time and effort of researching the vast database of GAAP. Do you agree?

In: Accounting

How important is it that a company's systems be based on a database? What advantages does...

How important is it that a company's systems be based on a database? What advantages does it provide? Include in your answer an example from a company.

In: Operations Management

what aggregate functions priobably would be usefull to school administrators to analyze student population and why?...

what aggregate functions priobably would be usefull to school administrators to analyze student population and why? (school environment database management)

In: Computer Science

whats the purpose of data warehouse design ? how is dimensional data models implemented in a...

whats the purpose of data warehouse design ?

how is dimensional data models implemented in a database covering relation implementation and multidemensional implementation.

In: Computer Science