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

  Tenant making an improvements to leased premises

If a tenant makes improvements to leased premises:Those improvements are the property of the tenant and can be depreciated by the tenant.

  Overview of the billing of cardiology practice

Using cardiology as the focus of your research, give a brief overview of the billing for which a cardiology practice is responsible.

  Selection of jury

What if your client has received negative media attention, is it still possible for him to receive a fair trial or will the jury ultimately be biased against him?

  Identify three options for machinery risk reduction

Outline the provision of the Occupational Safety & Health Act 2005 with regard to risk assessment Identify three options for machinery risk reduction Describe the factors that should be considered while carrying out the risk assessment exercise

  Community health nurse develops community partnerships

Write down the two ways the community health nurse develops community partnerships? What are three merits to community partnerships?

  Personality theories-a comparison

Discuss analytic, social, trait, biological, behavioral and learning, cognitive social learning, humanistic, and attachment.

  Personal philosophy on changes

What is your personal philosophy on changes that occur throughout early, middle, and late adulthood? How do you perceive changes in activities, relationships, health, and mental outlook?

  Particular racial-socioeconomic-gender groups

Identify one thing you could do to improve your own communication with others with regard to diversity. It doesn't have to be just using derogatory words toward particular racial, socioeconomic, or gender groups.

  Cultural and social view-points on memory

A description of the role of cultural and social affect on two of the given: eyewitness testimony, memory distortion, source memory, or recovered memories.

  Psychology prospered in the united states

Why have subdisciplines such as clinical psychology, industrial/organizational psychology, forensic psychology, and comparative psychology prospered in the United States?

  Explaining the real estate law

The basics of real estate law...fundamental difference between the attorney-client privilege and the concept of confidentiality. What is the difference between the two in the real estate law context?

  Produce an analysis of possible design solutions

Determine how your specification matches all aspects of the customer needs and design parameters, using a suitable method. Show your evaluation as a report.

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