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

  Single facility location problem

Treat this problem as a discrete facility location problem

  Theories of human development

Observe various theories of human development, describing relevant terminology, and addressing how the theory assists in the understanding of issues included in the selected topic.

  Childhood and adolescent eating habits

How do childhood and adolescent eating habits, likes and dislikes influence adult dietary choices. Are these learned behaviors or genetically inclined?

  Bioethics description

ichard is a sixty-seven year-old man with terminal cancer. He has just had a lover scan and been told to visit his doctor, an oncologist, and get the results.

  Smallpox outbreak within jurisdiction

Could this be a terrorist attack? Why? What could be the possible routes of exposure?

  Meaning of race and ethnicity

What does he mean by this? If the meaning of race is not stable and fixed, what implications does this have for things like public policy?

  Preservation of the confidentiality

How does technology affect the preservation of confidentiality?

  Effects of optimism on physical and psychological health

Find a peer reviewed article which discusses the effects of optimism on physical and psychological health. (You may need to find two articles in order to cover both the physical and the psychological areas).

  Visual perception in the cognitive methods

Describe the significance of visual perception in cognitive processes.

  Posttraumatic stress disorder and homelessness

Substance use disorder result in higher rates of homelessness for veterans and non-veterans?

  Personal definition of attractiveness

What is your own personal definition of attractiveness and how has it changed over time?

  Financial management in health service organizations

What do you know and understand about financial management in health service organizations. Identify what your assumptions are; explore if you may have any biases related to your assumptions. Question your assumptions.

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