Free

Array Structure Proposal - Essay Example

Comments (0) Cite this document
Summary
In order to assist the library administrator in managing the daily tasks and the billing department in determining any outstanding payments, three types of details were required to be saved; client’s data, the issuance details and the daily rates for each book. As these…
Download full paperFile format: .doc, available for editing
GRAB THE BEST PAPER93.3% of users find it useful
Array Structure Proposal
Read TextPreview

Extract of sample "Array Structure Proposal"

Array Structure In order to assist the library administrator in managing the daily tasks and the billing department in determining any outstanding payments, three types of details were required to be saved; client’s data, the issuance details and the daily rates for each book. As these details could not be represented by three basic data types, customized data types (class objects) were made to represent the three entities i.e. the client, issuance and daily rate.
The ‘Client’ object includes the details about the client i.e. the first and last name, address (data type: string, variable size) and the library number. The library number is unique for each client and has data type long (4 bytes). A ‘Client’ object would roughly be 34 to 40 bytes in size.
The ‘Issuance’ object contains the issuance details of the client. It includes the client’s library number for identification (data type: long, 4 bytes), the book number (unique) of the book issued (data type: long, 4 bytes), the book’s name (data type: string of variable length) and the date of issuing (data type: date, 3 bytes ). The status of the book whether having been returned to the library or not is also saved in the object (data type: Boolean, 1 byte). An ‘Issuance’ object would roughly be 32 bytes in size.
The ‘Daily Rate‘ object comprises of the book’s number (data type: long, 4 bytes) and the daily issue rate (data type: decimal, 5 bytes) of that book. A ‘Daily Rate’ object would be 9 bytes in size.
In order to save data comprising of multiple records of clients, issuance and daily rates, arrays were made of these objects.
Structural Pseudocode
Main
Declare maxClients as Integer
Declare maxIssuances as Integer
Set maxClients to 20
Set maxIssuances to 50
Declare Clients[maxClients] as Client
Declare Issuance[maxIssuances] as Issuance
Clients = ReadClientsDataFromFile()
Issuance = ReadIssuanceDataFromFile()
Declare ClientLibNum
Display “Enter Client’s Library Number”
Input ClientLibNum
DisplayClientDetails(parameter: ClientLibNum)
DisplayBooksIssued(parameter: ClientLibNum)
DisplayClientDuePayments(parameter: ClientLibNum)
End Program
Class Client
Declare Private First_Name as String
Declare Private Last_Name as String
Declare Private Address as String
Declare Private Library_Number as Long
Public Client()
First_Name = “”
Last_Name = “”
Address = “”
Library_Number = 0
End Constructor
Public Subprogram SetFirstName (parameter: fname)
First_Name = fname
End Subprogram
Public Subprogram SetLastName (parameter: lname)
Last_Name = lname
End Subprogram
Public Subprogram SetAddress (parameter: add)
Address = add
End Subprogram
Public Subprogram SetLibraryNum (parameter: libnum)
Library_Number = libnum
End Subprogram
Public Subprogram getFirstName ()
Return First_Name
End Subprogram
Public Subprogram getLastName ()
Return Last_Name
End Subprogram
Public Subprogram getAddress ()
Return Address
End Subprogram
Public Subprogram getLibraryNumber ()
Return Library_Number
End Subprogram
End Class
Class Issuance
Declare Library_Number as Long
Declare Book_Name as String
Declare Book_Number as Long
Declare Date_Issued as Date
Declare Returned as Boolean
Public Issuance()
Set Library_Number = 0
Set Book_Name = “”
Set Book_Number = 0
Set Date_Issued = “0/0/0”
Set Returned = False
End Constructor
Public Subprogram SetLibraryNum (parameter: libnum)
Library_Number = libnum
End Subprogram
Public Subprogram SetBookName (parameter: bname)
Book_Name = bname
End Subprogram
Public Subprogram SetBookNumber (parameter: bnum)
Book_Number = bnum
End Subprogram
Public Subprogram SetDateIssued (parameter: idate)
Date_Issued = idate
End Subprogram
Public Subprogram getLibraryNumber ()
Return Library_Number
End Subprogram
Public Subprogram getBookName ()
Return Book_Name
End Subprogram
Public Subprogram getBookNumber ()
Return Book_Number
End Subprogram
Public Subprogram getDateIssued ()
Return Date_Issued
End Subprogram
End Class
Class BookDailyRates
Declare Private Book_Number as Long
Declare Private DailyRate as Decimal
Public Subprogram SetBookNum (parameter: libnum)
Library_Number = libnum
End Subprogram
Public Subprogram SetDailyRate (parameter: rate)
DailyRate = rate
End Subprogram
Public Subprogram getBookNum ()
Return Book_Number
End Subprogram
Public Subprogram getDailyRate ()
Return DailyRate
End Subprogram
End Class
SubProgram DisplayClientDetails(parameter: ClientLibNum)
Declare count as Integer
Set count = 0
While count < maxClients
If (Client[count].getLibraryNumber() == ClientLibNum)
Display “Name:” + Client[count].getFirstName() + Client[count].getLastName()
Display “Address: ” + Client[count].getAddress()
End If
Set count = count + 1
End While
End SubProgram
SubProgram DisplayBooksIssued(parameter: ClientLibNum)
Declare count as Integer
Set count = 0
While count < maxIssuances
If (Issuance[count].getLibraryNumber() == ClientLibNum)
Display “Book Number:” + Issuance[count].getBookNumber()
Display “Book Name: ” + Issuance[count].getBookName()
Display “Date Issued: ” + Issuance[count].getDateIssued()
Display “Returned: ” + Issuance[count].getReturned()
End If
Set count = count + 1
End While
End SubProgram
SubProgram DisplayClientDuePayments(parameter: ClientLibNum)
Declare count as Integer
Declare totalBooks as Integer
Declare totalDueAmount
Set count = 0
Set totalBooks = 0
Set totalDueAmount = 0
While count < maxIssuances
If (Issuance[count].getLibraryNumber() == ClientLibNum AND Issuance[count].getReturned==False)
Declare dueAmount as Decimal
Declare numOfDays as Integer
Declare presentDate = Date.Now()
Declare dailyRate as Decimal
Set dailyRate = getDailyRateOfBook(parameter: Issuance[count].getBookNumber())
Set numOfDays = Issuance[count].getDateIssued() – presentDate
Set dueAmount = numOfDays x dailyRate
Display “Book Name: ” + Issuance[count].getBookName()
Display “Due Payment:” + dueAmount
totalBooks = totalBooks + 1
totalDueAmount = totalDueAmount + dueAmount
End If
Set count = count + 1
End While
Display “Total Books Still Issued: ”+ totalBooks
Display “Total Unpaid Dues: ” + totalDueAmount
End SubProgram
Sub Program getDailyRateOfBook(parameter: book_num)
Declare maxBooks as Integer
Set maxBooks to 200
Declare BookRates[maxBooks] as BookDailyRates
BookRates = ReadBookRatesFromFile()
Declare count as Integer
Set count to 0
While count < maxBooks
If BookRates[count].getBookNumber()==book_num
Return BookRates[count].getDailyRate()
End If
End While
End SubProgram
References
About.com (2012). Structured Programming. Retrieved from http://javascript.about.com/library/blstruc3.htm
Dalbey, J. (2012). Pseudocode Standards. Retrieved from http://users.csc.calpoly.edu/~jdalbey/SWE/pdl_std.html
iJava2 (2012). What is an Array? Design, Logic, Pseudocode of An Array. Retrieved from http://www.ijava2.com/array-design-logic-pseudocode-array/ Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Array Structure Proposal Essay Example | Topics and Well Written Essays - 500 words”, n.d.)
Retrieved de https://studentshare.org/logic-programming/1603239-array-structure-proposal
(Array Structure Proposal Essay Example | Topics and Well Written Essays - 500 Words)
https://studentshare.org/logic-programming/1603239-array-structure-proposal.
“Array Structure Proposal Essay Example | Topics and Well Written Essays - 500 Words”, n.d. https://studentshare.org/logic-programming/1603239-array-structure-proposal.
  • Cited: 0 times
Comments (0)
Click to create a comment or rate a document

CHECK THESE SAMPLES OF Array Structure Proposal

Proposal

... for carrying out the research. The whole process will be based on one month. Introduction: LON failed completely and lost all its power when as a result of withdrawal of the member countries, it was left with minimal armed forces that were not enough to help it in making the countries comply with the sanctions proposed by the league. The league came into being to control the aggressiveness practiced by some countries through measures of arms control, settlement and negotiation. LON had no armed forces of its own, owing to which it failed in threatening the aggressive nations with military might and simply failed to enforce its resolutions designed to maintain world peace and World War II initiated. Literature review: According... 08 April...
2 Pages(500 words)Essay

Redundant array of independent disks features

...?Definition: RAID, it is a term which means Redundant Array of Independent Disks that was changed from the initial term which was Redundant Array of Inexpensive Disks (Brinkmann, et al, 2007); it is technology which provides increased storage functions and reliability through redundancy. Features: It has redundant architectures so as to enable the storage facility has the fault tolerance property. Has a higher throughput levels than a single hard disk or group of independent hard drives. The disks used in array are independent of each other thus reducing the cost of implementing the arrays. (Dawkins and Arnold 2006). Architecture: The following are some of commonly used...
5 Pages(1250 words)Term Paper

Phase-Array Radar and Synthetic-Aperture Radar (SAR)

...? Phase-Array Radar and Synthetic-Aperture Radar Phase-Array Radar: Phased array radar represents a directive antenna that is either formed of individual radiation antennas, or formed by constituents that generate such form of radiation, the nature and route of which are obtained by the relative stages and amplitudes of the currents reflected at the particular components. The relative phases are capable of variations, hence allowing steering of the radar beams. Applications in radars are most common particularly in which the beams need to be shifted from one place to another within the space. It also helps in obtaining data that require flexibility in the collection of the data (Skolnik,...
3 Pages(750 words)Research Paper

Proposal

...PARKING LOT CHAOS INTRODUCTION It is a well known fact that of this are facing an acute parking problem due to severe shortage of parking place. Present ruling requires all students not staying in the campus and using their private vehicles to use the parking space provided to them at Beaver stadium. They have no choice but to leave their cars at the allotted parking lot and use a bus to come to the university campus or walk for over 30 minutes to reach the classrooms. Again, depending on one's arrival time and parking lot availability at the university, he/she may have to suffer even more. This means that students may have to reschedule their arrival in the early morning even if their classes are in the afternoon session just... LOT CHAOS...
5 Pages(1250 words)Essay

Market Structure Research Proposal

...print of what should and should not be done in the process of research. A detailed search for material has been made. Finally, I got all the material on the basis of which the paper is completed. Secondary data alone is used in the studies which are collected from electronic sources. The data collected are analyzed on the basis of required outcome of the research and only relevant data are written in the paper. No primary source such as market survey or product survey is made for the collection of data and analysis. Structure of the answer The paper is prepared in such a manner that each question is followed by its answer so that it will be of immense help to the reader to easily understand the situation. A brief...
10 Pages(2500 words)Research Proposal

Corporate Governance Policies in Ireland

...principles and rules are being reviewed and strengthened in order to reinstall investor confidence. At the heart of these corporate governance reforms is the common interest in the effectiveness of boards of directors. Corporate governance codes, experts and activists have long advocated changes in the board structure. As a result of the successful implementation of corporate practice codes in the private sector corporations, the government has decided to implement the system in public/civil departments and government offices. The public offices are supposed to benefit the people who pay tax to the government on various assets and income earned by them. The government departments should exhibit transparency, and...
11 Pages(2750 words)Assignment

Proposal

...Number Solution The solution that is suggested for this business writing proposal is that the should take off the $200 charges that they take for registration at the start of the semester. Taking registration fees every semester for classes may be done to ensure that students register in the classes on time and clear off all their dues for the semester. They can remove the charges for registration and instead create an online registration panel where students have to complete their registration requirements within the first or second week of the semester. Taking and refunding the charge every semester may be an extra hassle work for the university and also for the students who find it a burden to pay $200 for...
1 Pages(250 words)Essay

Structure Framework: Structure and Strategy

...that are meant to improve the strategic management fail because the structures and strategies tend to threaten traditional habits, assumptions and norms. For this reason, the top management in the company has identified an organizational learning-process where all the staff members can share the understanding of changes as a tool towards flexibility and competitive advantages. The implementation of organizational learning process has been the most effective tool in the company as it helps in the manager to develop a more dynamic and systematic perspective. The only challenge that faces this tool is on how to move from the generalization system thinking tools and the processes that help the managers re-conceptualize...
3 Pages(750 words)Annotated Bibliography

Research proposal/ grant proposal

...Research Proposal: Proper Diet and Lifestyle as Cancer Prevention Strategies February Specific Aims According to the World Health Organization (WHO) (2014), cancers dominantly represent some of the leading causes of morbidity and mortality for many countries, with around 14 million new cases and 8.2 million dying from cancer in 2012. Cancer can have genetic causes, but environmental factors are also influential variables that could increase cancer risks. The WHO (2014) asserted that around 30% of people dying from cancer do so because of these five behavioral and dietary risks: “high body mass index, low fruit and vegetable intake, lack of physical activity, tobacco use, [and] alcohol use.” These risks are external...
16 Pages(4000 words)Research Proposal

Array Manipulation

...Array Manipulation of the Task The array manipulation is basically a computer programming where a task can be performed with the help of various variables. A task usually involves a useful array which can be populated processed to display a result. In this paper, the task chosen to do array manipulation is the expense analysis of group of resorts. In this task, the various expenses of resort like room, food and other activities are calculated for a particular season. Here, the main aim is to explore the cost and benefits of each resort on various locations on a vacation time. The data provided for the task will be the off season expenses of those ten resorts. Pseudo Code...
1 Pages(250 words)Coursework
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.

Let us find you another Essay on topic Array Structure Proposal for FREE!

Contact Us