Creating a library for reusable code

Assignment Help Other Subject
Reference no: EM1379045

Question: Imagine you realize that the code you had constructed can be reused for several other purposes for future programs. You decide to create a library for your reusable code. Using the pseudocode for the program, you identify the aspects of the program that can be reusable and write/rewrite it so it can be reused. You rewrite your pseudocode to implement this reusable code.

This is my code, how would I rewrite it?

Program Name { //begin of program

Procedure TrackPayment {

if amount_received < billing_amount then
amount_owing = billing_amount - amount_received

if date_payment_received > thirty_days then
late_fee_amount = late_charge_rate * billing_amount

account_balance = account_balance + amount_owing + late_fee_amount

}

Procedure CalculateInvoice {

if client_type = regular then
billing_amount = regular_price
else
billing_amount = regular_price - (service_price * discount_rate)

billing_amount = billing_amount + account_balance
}

Procedure PrintInvoice {

print client_name
print client_mailing_address
print invoice_number
print invoice_date
print billing_date
print billing_amount
print billing_period
}

begin main ( ) {
do TrackPayment
do CalculateInvoice
do PrintInvoice
}

} //end of program

Reference no: EM1379045

Questions Cloud

Cobol as a business oriented language : All COBOL was 1st business-oriented language available, is thirty plus years old, and is still being used for many business applications offer opinions on why it is still being used.
Narrative program for currency conversion : Use the C compiler to write a C program that holds your narrative from broken down into one line sentences, that have been commented out.
Determine all binary cyclic codes : Determine all binary cyclic codes of length 5.
Identify and discuss strategic capabilities : Identify and discuss strategic capabilities of the chosen company using appropriate strategy tools and identify strengths and weaknesses for the firm.
Creating a library for reusable code : Imagine you realize that the code you had constructed can be reused for several other purposes for future programs. You decide to construct a library for your reusable code.
Assembly language programming code for 8086 : Change any binary number found in register AX to equivalent ASCII code for each hexadecimal nibble in AX.
Improve the poorly constructed communications : Suggest methods that could improve the poorly constructed communications, with reference to the theory and choose two of these communications that you feel were well constructed or were able to get the message across and analyse why this was the c..
Question about consecutive bytes : Determine the address where the longest consecutively numbered string of bytes starts. Consecutive bytes are defined as those that differ through the number 01.
Object oriented system design with uml : Provid with initial needs collected at the first interview with the owner of a video rental store, who is ordering an data system to improve efficiency of his business.

Reviews

Write a Review

Other Subject Questions & Answers

  Critically discuss and analyze the preventive approaches

Mass tourism has recently been recognized within the tourism literature as potentially being capable of more responsible activities and able to integrate sustainability principles (Budeanu, 2005) Critically discuss and analyze the preventive app..

  Description of victims'' rights

Provide a historical description of Victims' Rights and explain how Victims' Rights are considered today?

  Explaining the contract issues with employment

In the event Mary resigns her position with Acme, she shall not engage in selling business forms for any other company located anywhere in the United states including Hawaii and Alaska for a period of ten years.

  Neurotic needs and behavior

Using Horney's Theory, discuss this character Jackie Gleason on the TV show "The Honeymooners". Describe neurotic needs and trends and how has his gender and culture influenced the character's neurotic needs and behavior.

  Relationship between behavior and culture

What is the relationship between behavior and culture? Why is it important to understand this relationship?

  Examine the analysis of child support case

Mr. Johnson is a business manager for a large company. He has been ordered to pay $3,000 per month child support based on a net income of $6,000 per month.

  Explain the odds-ratios for the risk of overall cancer

Explain and interpret the odds-ratios for the risk of overall cancer, Do you think the study was appropriate in reference to ethics?

  Explanation of biological affects of psychology

Develop a short presentation explaining the biological affects of psychology.

  The current resources are being utilized effectively

In the under border control it was mentioned that most areas of the northern border are inaccessible to traditional patrols. Most of the focus is towards the south, potentially leaving the northern border much more vulnerable than other areas. Do you..

  Energy balance and weight management

What is the relationship between energy balance and weight management?

  Gender socialization of children

Compare African-American, Latino and Asian-American families in terms of gender socialization of children and the influence of the multiple oppressions of race, gender, and social class.

  Delirium and dementia

How would one differentiate between delirium and dementia? What methods would you use to assess the presence of each?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd