Define a class named Library with following characteristics Data members: int acc_num-stores the accession number of...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Define a class named Library with following characteristics Data members: •int acc_num-stores the accession number of the book. • String title - stores the title of the book. String author-stores the name of the author. Member Methods: • setValues() - To set values of accession number, title and author. This function return type is void. • compute() - This method accepts late Days (number of days late the book returned) and calculates the fine at the rate of $ 2 per day. • void display() To display the details in the following format: "Accession-Number Title Author" Note: Print Accession number, title and author separated by a single space. Input 1001 Java Programming Language Ken Arnold, James Gosling, David Holmes 4 where, • First line represents the Accession Number. . Second line represents the title of the book. • Third line represents the author of the book. Fourth line represents the number of days late. Output 1001 Java Programming Language Ken Arnold, James Gosling, David Holmes 8 where, • First line represents output of display call. • Second line display calculated fine amount. Define a class named Library with following characteristics Data members: •int acc_num-stores the accession number of the book. • String title - stores the title of the book. String author-stores the name of the author. Member Methods: • setValues() - To set values of accession number, title and author. This function return type is void. • compute() - This method accepts late Days (number of days late the book returned) and calculates the fine at the rate of $ 2 per day. • void display() To display the details in the following format: "Accession-Number Title Author" Note: Print Accession number, title and author separated by a single space. Input 1001 Java Programming Language Ken Arnold, James Gosling, David Holmes 4 where, • First line represents the Accession Number. . Second line represents the title of the book. • Third line represents the author of the book. Fourth line represents the number of days late. Output 1001 Java Programming Language Ken Arnold, James Gosling, David Holmes 8 where, • First line represents output of display call. • Second line display calculated fine amount.
Expert Answer:
Answer rating: 100% (QA)
Libraryjava public class Library data members private int accnum private String ... View the full answer
Related Book For
Systems Analysis and Design in a Changing World
ISBN: 978-1305117204
7th edition
Authors: John W. Satzinger, Robert B. Jackson, Stephen D. Burd
Posted Date:
Students also viewed these programming questions
-
Marshall Company is a large manufacturer of office furniture. The company has recently adopted lean accounting and has identified two value streams-office chairs and office tables. Total sales in the...
-
What is the equivalent present worth of annual operation and maintenance (O&M) cost of $300,000/year at a 2% interest rate for a bridge that will be in operation indefinitely? The monthly maintenance...
-
Harris Fabrics computes its plantwide predetermined overhead rate annually on the basis of direct labor-hours. At the beginning of the year, it estimated that 40,000 direct labor-hours would be...
-
???????Need answer for below questionWoolworth Ltd, After Pay Ltd, and Santos Ltd for the years 2021,2020 and 2019. Examine the consolidated Cash Flow Statements foreach companies acr f) If the firm...
-
The following data are for a simple steam power plant as shown in Fig. P6.99. State 1 2 3 4 5 6 7 P MPa 6.2 6.1 5.9 5.7 5.5 0.01 0.009 T C 45 175 500 490 40 h kJ/kg - 194 744 3426 3404 - 168 State 6...
-
A Pew Research Center survey found that social networking is popular in many nations around the world. The file GlobalSocialMedia contains the level of social media networking (measured as the...
-
List the restrictions placed on auditors by the professional accountancy bodies which are designed to prevent auditors' independence from being impaired through: (i) financial involvement with an...
-
Extrim Company produces monitors. Extrims plant in San Antonio uses a standard costing system. The standard costing system relies on direct labor hours to assign overhead costs to production. The...
-
What types of interviewing styles are there, and which do prefer using? Have experienced a group interview? If so, explain how that went ? Have ever been part of any of these: stress interview, STAR...
-
David R. and Ella M. Cole (ages 39 and 38, respectively) are husband and wife who live at 1820 Elk Avenue, Denver, CO 80202. David is a self-employed consultant, specializing in retail management and...
-
Solve 8 0 8x = x dx -
-
es Walton Airlines is a small airline that occasionally carries overload shipments for the overnight delivery company Never-Fail, Incorporated. Never-Fail is a multimillion-dollar company started by...
-
Find the values of a, b, c, and d which satisfy the matrix equation. [a+c a+2b [0 -7] e-1 4d-6 13 2d
-
What is the freezing point of 22.1 g NaCl in 114 mL of water. Round your answer to 3 significant digits. Freezing point: Part 2 of 4 What is the boiling point of 22.1 g NaCl in 114 mL of water. Round...
-
Original Price New Price $6 1. $12 2. $10 3. $10 4. $20 5. $20 $8 $6 $12 $40 Identify the elements below DELL 6. Is the line elastic or inelastic? 7. Is the line elastic of inelastic? 9. Which line...
-
Compare the expected value and the standard deviation of Y and Z. Which one has the higher expected value? Which one has the higher standard deviation? Does playing in one way dominate the other?...
-
Rahim of Calcutta consigned 100 cases of medicine. Costing Rs. 1,000 per case to Karim of Kanpur on 1.1.2017. The goods were to be sold at 25% above cost. Any deficiency in the selling price was to...
-
2. Assume a person bends forward to lift a load "with his back" as shown in Figure P12.42a. The person's spine piv- ots mainly at the fifth lumbar vertebra, with the principal supporting force...
-
The case description at the beginning of this chapter presented the situation of a new project leader, Mary Hendricks. Her company, Custom Apps Now, had just promoted her to be a project leader,...
-
What is the purpose of UML use case diagrams?
-
What is the purpose of an activity diagram?
-
What are the various forms of virtual communication used in modern organizations?
-
What are the types of interpersonal communication?
-
How does one choose between communication methods and handle barriers to effective communication?
Study smarter with the SolutionInn App