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

  Entrepreneurship-affecting the health care field

Describes the positive and negative ways that entrepreneurship has affected the health care field.

  What is the yield to maturity

What the current yield. What is the yield to maturity.

  Types of psychological testing used in workplace

Please can someone help me out with some information on three types of psychological testing used in the workplace and differentiate between those used for pre-employment or retention.

  Diagnosis of peptic ulcer disease

Mr. C. has been diagnosed with peptic ulcer disease and the following medications have been ordered:

  Introduction to confidentiality therapy

Confidentiality is one of the most significant ethical and legal issues in the field of mental health. Clients/patients rely on this confidentiality when they share their personal issues with the therapist.

  Cognitive interventions among older adults

Cognitive Interventions among Older Adults: an article that is about the trends in psychological research methodology.

  Computing expected completion time

What is the Critical Path? What is the expected completion time?

  Outdoor recreation

Recreation Opportunity Spectrum, contribution of outdoor recreation to the local community, nature-based recreation site, natural environment of the site,

  Decision making in mental health counselling

Explain the implications of survey data on decision making in mental health counselling. Finally, explain any limitations to the use of this design in mental health counselling.

  Popular literature-harry potter series

Recognize the literary production you chose to focus on. Provide the brief overview of what the piece is about, the author's background and how the piece fits or does not fit with other literature of that genre.

  Financial relationship and arrangements

Can you please explain the financial relationship and arrangements between a nursing home facility and its residents.

  What do sociologists study

What do sociologists study. Identify some of the things they study and the ways they study them

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