Fundamentals of object-oriented programming Project 2 – e-Library The e-Library stores CD, books, journals, and accessories. There are various kinds of books such as books of computer science, Chinese...

1 answer below »
I got 2 assignments both due this Friday. May I know how much does it cost?


Fundamentals of object-oriented programming Project 2 – e-Library The e-Library stores CD, books, journals, and accessories. There are various kinds of books such as books of computer science, Chinese literature, traveling and the likes. Accessories include, for example, video disc, software installation DVD and so on. General activities of e-Library include issues of items to borrowers, updating items details and stock availability levels, fine payment collection, etc. The activities would look very similar to the libraries of any universities or public libraries. Please refer to the following brief description. General description of objects related to a library: · Books · Reference periodicals / journals · Multimedia materials (CD, DVD, software, etc.) · Newspaper · Students / teachers, or other related personnel, etc. General description of activities related to a library: · Add / Change / Delete publications (including books, reference periodicals, etc.). · Maintain Authors / Publishers of the publications. · Keep track of activities of reserving, borrowing and returning the publications. · Enquiry of the information (e.g. location, available quantity and dates, etc.) of the publications You are required to design and implement an object model in Java using OOP (i.e. a Java program with class definitions with properties and methods, object instantiation, and manipulation, etc.) for e-Library based on the above description. You need to design classes (e.g. books, students, authors, etc.) with their attributes and methods. A sample class and method design can be found here: https://docs.oracle.com/javase/tutorial/java/concepts/class.html. Usually you need to create some class files (i.e. books, authors, borrow / return records, etc.) in Java and some demo classes utilizing the classes created (i.e. books, authors, etc.). Features of object-oriented programming such as inheritance, encapsulation, etc. should be found from your source code in Java. Please refer to the URLs from appendix B. It is optional to use database connection with JDBC to store the records. If you want to set the initial values of some objects you can consider to assign default values to some variables inside your Java program or simply reuse the approach from Project1 using a .txt file to load the default records for some objects such as books, authors, etc. to the computer memory during the program execution. It is highly recommended you are going to do a research by browsing the internet for library information / database design for building up your library object model. A project report containing · the source code in Java and data files (if any) (50%), · design in diagrams (e.g. block diagrams, flowcharts, UML Diagrams, etc.) (20%), · and evidence of successful program execution (e.g. screen capture, results, etc.) (30%), should be submitted on or before the deadline stated in the course document. The source code file(s) should also be submitted to Turnitin/Moodle for similarity checking. The submission link will be created later. A sample library database / information structure example is given from Appendix A. Marking Criteria: Your grade depends on a number of things, including functionality, meeting requirements, successful compilation, comments, variable type declaration, appropriate identifier names, java syntax, good use of library packages, etc. Plagiarism is strictly prohibited. In case of plagiarism, you will be subject to penalty such as mark deduction or failure / zero mark in your assignment. Appendix A https://riptutorial.com/sql/example/4978/library-database https://www.queryexamples.com/sql/general/download-sample-library-database-with-data/ Appendix B – OOP Concepts in Java https://www.w3schools.com/java/java_oop.asp https://www.javatpoint.com/java-oops-concepts https://www.geeksforgeeks.org/object-oriented-programming-oops-concept-in-java/ Fundamentals of object-oriented programming Project 1 – Silver Computer Mall The purpose of this assignment is to let the student learn the syntax of Java and write a simple application program to process and display the results. You are developing a simple text-mode ordering / invoicing application for “Silver Computer Mall”, a small company owned by a student who provides wide variety of personal computer products / spare parts such as mouse, keyboard, software, CPU, RAM, MotherBoard, Power Supply, Computer Case, Printer, etc. The types of products / spare parts available now should include (but not limited to) the below items: a. Rogi Mouse - $850/piece b. Rogi Keyboard - $730/piece c. MSX Motherboard - $1950/piece d. Intxl CPU - $4500/piece e. Kingstxn 4G RAM Module - $850/piece f. Computer Case - $2600/piece g. Brothxr Laser Printer - $ 4200/piece For each order, $200 must be added for local delivery for each order. An optional $500 PC assembly fee is needed if the customer prefer you to assembly the PC for them. The system provides ordering services for customers to estimate the cost of a personal computer based on the configuration and service requirements inputted by the users. The program should be able to generate an invoice (displayed to the screen and printed to a text file) at the end of the procedure. General requirements: 1. You need to create a text file (.txt) manually, type in and store the item name and unit selling prices of various products / spare parts and put in any directory you can have access to. This text file can be used as a “database” of items available to be selected for ordering. It is optional to use database such as MySQL and JDBC connections in Java. The type of products/spare parts and price should not be hard coded in the Java program, the information should be retrieved from the text file mentioned above. You can add more categories of products/spare parts if you think appropriate. 2. Create some pairs of appropriate attributes / variables (e.g. itemname1, price1, itemname2, price2,…..itemnameN, priceN, etc.) in your java program code. Read the name and price of each item from the text file (.txt) and store them in the attributes / variables. It is optional to use array structure instead of a set of appropriate variables. It is highly desirable to use OOP approach by creating objects, such as an “item” object to host the attributes / variables just mentioned above. Afterwards you can then develop methods to manipulate the values of those attributes / variables. 3. Design a set of simple, reasonable, and proper steps for the ordering and invoicing procedures described below. Clear instructions and feedback messages should be given along the ordering procedure. It is possible for the user to quit the ordering and invoicing application at any time and stage by having and “Exit” option. 4. Display a text-based menu on the screen showing all available items together with their selling prices for the users to pick up which item to purchase and the associated quantity. You can assume picking one item at a time and then inputting the quantity required for that item. Examples of text-based menu can be found from the following URL: http://chronicles.blog.ryanrampersad.com/2011/03/text-based-menu-in-java/ You can put the available choices in a while(true) loop to display all available items until the user select “11. Exit” to break the loop. After the user select an item, the menu can prompt the user to enter the quantity needed for that item. The text-menu can look like the following one. Silver Computer Mall Ordering System – Main Screen Good afternoon, Dear Customer, please select the following items 1. Rogi Mouse - $850/piece 2. Rogi Keyboard - $730/piece 3. MSX Motherboard - $1950/piece 4. Intxl CPU - $4500/piece 5. Kingstxn 4G RAM Module - $850/piece 6. Computer Case - $2600/piece 7. Brothxr Laser Printer - $ 4200/piece 8. PC Assembly (optional) - $500/order 9. Local Delivery (optional) - $ 200/order 10. Finish ordering and generate invoice 11. Exit. Please select : ___ 5. Allow the user to input the optional choices of PC assembly and the local delivery address in the ordering procedure. You can simply include these two choices as the items to be selected during the ordering process or display extra questions to prompt users to input options before ending the input by users during the ordering process. 6. After picking up every item (except PC Assembly and Local Delivery), then ask the user how many quantities would be needed. For example, please refer to the following sample screen needed. You have selected item no. 7. Brothxr Laser Printer - $ 4200/piece, how many quantities do you need: ___. Afterwards, it is necessary to get back to the main ordering screen. Until the user select “11. Exit”, the ordering process can continue. 7. If user select “9. Local Delivery (optional)”, you can add another prompt to allow the user to input the address just like the following: You have selected item no. 9. Local Delivery (optional)”, please enter your local delivery address: _________________________________________ 8. A sample invoice with the following information contents, will be displayed to the user based on their input after user select “10. Finish ordering and generate invoice” from the above screen to proceed to invoice generation. ========================Silver Computer Mall==================== ==========================PC Order Invoice====================== Date: 21/01/2021 Customer Name: Wrong XX xxxx Telephone: 28346677 Delivery address: xxxxxxx xxxxxxx xxxxxx xxxxx xxxx, Kowloon, Hong Kong ------------------------------------------------------------------------------------------------ Products/ServicesQty. Unit Price($)Sub-total($) a. Rogi Mouse1850850 b. Rogi Keyboard1730730 c. MSX Motherboard119501950 d. Intxl CPU145004500 e. Kingstxn 4G RAM Module48503400 f. Computer Case126002600 g. Brxther Laser Printer142004200 --------------------------------------------------------------------------------------------- h. PC Assembly Service Charge500 i. Local delivery Fee200 Total Price:$ 18930 =====================Thank You Very Much==================== Confirm Order (Y/N) 9. If the ordering information is correct after review by users, they can have the “Confirm Order (Y/N)” option prompt displayed on screen to finalize their orders. 10. IF “Y” is selected, the ordering information shown above would be written to a text file (e.g. invoice.txt) to become an invoice and finish the ordering procedure. You should prompt the user to check for the existing text file to prevent replacement of the original invoice file with the same name in the same directory. If a text file with same name exists, you should warn the user that the original file will be replaced. Or you can consider using the customer name plus their telephone number plus the date and time od ordering as the invoice file number. 11. If “N” is selected, it is possible to discard all inputs by the user. You can restart the entire process by going back to the main menu or simply you can allow the ordering process to be terminated. 12. Comments should be added to the program code appropriately at the right places. 13. Graphical user interface implementation is optional. 14. Hint and example: https://stackoverflow.com/questions/30544859/what-is-the-best-way-to-print-invoice-in-java or https://javatutoring.com/calculate-electricity-bill-java-program/ 15. The above menu structure and workflow are just made for illustration purpose. If you are
Answered 1 days AfterMay 11, 2021

Answer To: Fundamentals of object-oriented programming Project 2 – e-Library The e-Library stores CD, books,...

Rushendra answered on May 13 2021
140 Votes
Project2/.classpath
    
        
            
        
    
    
    
Project2/.project
     Project2
    
    
    
    
        
             org.eclipse.jdt.core.javabuilder
            
            
        
    
    
         org.eclipse.jdt.core.javanature
    
Project2/.settings/org.eclipse.jdt.core.prefseclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
Project2/bin/library/Book.classpackage library;
public synchronized class Book {
private String author;
private String title;
private String type;
private int id;
private int quantity;
public String getAuthor();
public String getTitle();
public int getId();
public int getQuantity();
public void setQuantity(int);
public void Book(int, String, String, String, int);
public String toString();
}
Project2/bin/library/books.txt1,OOPS,daniel,CD,10
2,data Structures,william,Book,5
3,algorithms,hARRY,Periodical,2
Project2/bin/library/LibraryManagement.classpackage library;
public synchronized class LibraryManagement {
java.util.List booklist;
java.util.Scanner s;
public void LibraryManagement();
public static void main(String[]) throws NumberFormatException, java.io.IOException;
private void displayMenu() throws NumberFormatException, java.io.IOException;
private void BorrowBook();
private void editBook();
private void addBook();
private void search();
private java.util.List readCSV() throws NumberFormatException,...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here