StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

Array Structure Proposal - Essay Example

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 paper File format: .doc, available for editing
GRAB THE BEST PAPER92% of users find it useful
Array Structure Proposal
Read Text Preview

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 PseudocodeMain Declare maxClients as Integer Declare maxIssuances as IntegerSet maxClients to 20Set maxIssuances to 50Declare Clients[maxClients] as ClientDeclare Issuance[maxIssuances] as IssuanceClients = ReadClientsDataFromFile()Issuance = ReadIssuanceDataFromFile()Declare ClientLibNumDisplay “Enter Client’s Library Number”Input ClientLibNumDisplayClientDetails(parameter: ClientLibNum)DisplayBooksIssued(parameter: ClientLibNum)DisplayClientDuePayments(parameter: ClientLibNum)End ProgramClass ClientDeclare Private First_Name as StringDeclare Private Last_Name as StringDeclare Private Address as StringDeclare Private Library_Number as LongPublic Client()First_Name = “”Last_Name = “”Address = “”Library_Number = 0End ConstructorPublic Subprogram SetFirstName (parameter: fname) First_Name = fnameEnd SubprogramPublic Subprogram SetLastName (parameter: lname) Last_Name = lnameEnd SubprogramPublic Subprogram SetAddress (parameter: add) Address = addEnd SubprogramPublic Subprogram SetLibraryNum (parameter: libnum) Library_Number = libnumEnd SubprogramPublic Subprogram getFirstName () Return First_NameEnd SubprogramPublic Subprogram getLastName () Return Last_NameEnd SubprogramPublic Subprogram getAddress () Return AddressEnd SubprogramPublic Subprogram getLibraryNumber () Return Library_NumberEnd SubprogramEnd ClassClass IssuanceDeclare Library_Number as LongDeclare Book_Name as StringDeclare Book_Number as LongDeclare Date_Issued as DateDeclare Returned as BooleanPublic Issuance()Set Library_Number = 0Set Book_Name = “”Set Book_Number = 0Set Date_Issued = “0/0/0”Set Returned = FalseEnd ConstructorPublic Subprogram SetLibraryNum (parameter: libnum) Library_Number = libnumEnd SubprogramPublic Subprogram SetBookName (parameter: bname) Book_Name = bnameEnd SubprogramPublic Subprogram SetBookNumber (parameter: bnum) Book_Number = bnumEnd SubprogramPublic Subprogram SetDateIssued (parameter: idate) Date_Issued = idateEnd SubprogramPublic Subprogram getLibraryNumber () Return Library_NumberEnd SubprogramPublic Subprogram getBookName () Return Book_NameEnd SubprogramPublic Subprogram getBookNumber () Return Book_NumberEnd SubprogramPublic Subprogram getDateIssued () Return Date_IssuedEnd SubprogramEnd ClassClass BookDailyRatesDeclare Private Book_Number as LongDeclare Private DailyRate as DecimalPublic Subprogram SetBookNum (parameter: libnum) Library_Number = libnumEnd SubprogramPublic Subprogram SetDailyRate (parameter: rate) DailyRate = rateEnd SubprogramPublic Subprogram getBookNum () Return Book_Number End SubprogramPublic Subprogram getDailyRate () Return DailyRate End SubprogramEnd ClassSubProgram 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 WhileEnd SubProgramSubProgram 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 WhileEnd SubProgramSubProgram 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 IntegerDeclare presentDate = Date.Now()Declare dailyRate as DecimalSet dailyRate = getDailyRateOfBook(parameter: Issuance[count].

getBookNumber())Set numOfDays = Issuance[count].getDateIssued() – presentDateSet 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: ” + totalDueAmountEnd SubProgramSub Program getDailyRateOfBook(parameter: book_num) Declare maxBooks as Integer Set maxBooks to 200 Declare BookRates[maxBooks] as BookDailyRates BookRates = ReadBookRatesFromFile()Declare count as IntegerSet count to 0While count < maxBooksIf BookRates[count].

getBookNumber()==book_num Return BookRates[count].getDailyRate()End IfEnd WhileEnd SubProgramReferencesAbout.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

CHECK THESE SAMPLES OF Array Structure Proposal

Evaluation of leadership theories

It is evident from the research that the behavioral theories seek to identify what the leader can do to improve leadership skills and not seek the inborn capabilities and traits of the leader in leading a team, and this essentially what happens in the CCS Group.... hellip; By the end of this study, the researcher would be able to identify the leadership theory applied in Cleshar Contract Service; to explain the characteristics of the leadership theory applied in Cleshar Contract Services; to come up with recommendations to the organization's policy makers in relation to b leadership theories benefit....
11 Pages (2750 words) Research Proposal

Improving Student Management Information System

From the paper "Improving Student Management Information System" it is clear that the user acceptance rate varies from individual to individual considering the difference in accepting the technology.... In this regard, the user acceptance rate is dependent on teachers and students.... hellip; Based on the discussion, it was found that before implementing the proposed Kidbrooke Student Information Management System (KSIMS); it is important to conduct wide arrays of tests in the form of functional, integration, user acceptance, multi-user and bash, system tests, and automated tests to identify key loopholes....
12 Pages (3000 words) Research Proposal

Educational System Structure in Morocco

"structure of the Educational System in Morocco and Its Capacity for Addressing the Needs of the Hospitality Industry" paper evaluates the current structure of the educational system to answer the needs and expectations of hospitality professionals in a quantitative and qualitative plan.... Thus, educating the masses to support the 2010 Vision to support tourism and to take on the new jobs is a challenge and it is important to try to better understand the expectations of hospitality and tourism industry managers, increase capacity for training and education for jobs in tourism and understand if the structure of the education system in Morocco can support the needs and expectations of the hospitality industry in the country....
14 Pages (3500 words) Research Proposal

A Challenge to Teachers of Communication Skills

The paper “A Challenge to Teachers of Communication Skills” highlights the listener's role in applying techniques to enable, monitor and assess his/her listening as well as his/her speaking proficiencies.... Instructional programs in listening skills have an important position in language curriculum....
10 Pages (2500 words) Research Proposal

A Hybrid Shape Representation: Surface Modeling

The paper “A Hybrid Shape Representation: Surface Modeling” discusses the importance of surface modeling in computer-aided design.... Computer Aided Design has become an integral and indispensable part of the design, analysis, and production of gadgets across the globe.... hellip; The author states that the number of CAD systems has magnanimously risen over the recent past....
14 Pages (3500 words) Research Proposal

The Use of Various E-Books among Statistics Students In Libya

In a study designed to try and investigate the general attitude of millennial students towards e-books and books, Nicholas and Lewis (2008) found that millennial students despite having a vast array of technological advancements at their disposal, still preferred the use of print to e-books (p....
8 Pages (2000 words) Thesis Proposal

Assessing Risks of Fire Destruction in Structures

… The paper "Assessing Risks of Fire Destruction in Structures" is a great example of a research proposal on engineering and construction.... The paper "Assessing Risks of Fire Destruction in Structures" is a great example of a research proposal on engineering and construction....
10 Pages (2500 words) Research Proposal

Risks and Opportunities in Adopting Mobile Learning for Secondary Education Institutions

… The paper “Risks and Opportunities in Adopting Mobile Learning for Secondary Education Institutions” is a dramatic variant of a research proposal on education.... The paper “Risks and Opportunities in Adopting Mobile Learning for Secondary Education Institutions” is a dramatic variant of a research proposal on education....
9 Pages (2250 words) Research Proposal
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.
Contact Us