Write a program consisting of multiple objects

Assignment Help JAVA Programming
Reference no: EM133751795

Programming and Algorithms

Assessment Purpose:

The purpose of this assignment is to assess your progress towards attainment of a selection of the learning objectives as covered up to week 7. On successful completion of this assignment, you should have demonstrated that you are able to:

Write a program consisting of multiple objects which interact with each other by following appropriate design practices
Write a program that provides the requested functionality for the system
Utilise appropriate collection classes from Java's Collections API in appropriate ways/places
Read data from and write data to text files
Handle exceptions by constructing try ... catch blocks for appropriate circumstances
Design a text-based user interface

Assessment topic:
In this assignment, you will create a Java software package to process the records of books in a library according to the given instructions/commands. Your Java software MUST provide ALL the following functionalities:

Instructions for Library Management System
Add a Record

To add a book record to your library system, use the following format:

add title The Great Gatsby; author F. Scott Fitzgerald; ISBN 9780141182636; genre Fiction; year 1925

This instruction adds or updates a record for a book with:

Title "The Great Gatsby"
Author "F. Scott Fitzgerald"
ISBN "9780141182636"
Genre "Fiction"
Year of publication "1925"

If the ISBN matches an existing record in your library system, the existing record will be updated with the new information provided (e.g., genre, year).

Otherwise, the system adds the new valid record to the library system.

Delete Record(s)

To delete record(s) from your library system by title, use the format:

delete title The Great Gatsby

This instruction deletes the record(s) with the title "The Great Gatsby" from the library system.

To delete record from your library system by ISBN, use the format:

delete isbn 9780141182636

This instruction deletes the record with the isbn "9780141182636" from the library system.

Query Records

To query records in your library system by title, author, genre, or ISBN, use the format:

query title The Great Gatsby query author F. Scott Fitzgerald query genre Fiction
query ISBN 9780141182636

Each query retrieves books that match the specified criteria. The query results are saved to a report file for later reference.

Save Results to Files

The instruction save does the following:

Save the resulting data collection after executing add and delete instructions into a specified output file.
Save the query results to a separate report file.
If there are multiple "query" commands, append the latest query results to the end of the report file.
Separate the results of different query instructions using dashed lines with query instructions.

Sample Data and Instructions
Sample Data (books.txt)

Title: The Great Gatsby Author: F. Scott Fitzgerald ISBN: 9780141182636
Genre: Fiction Year: 1925
Title: Pride and Prejudice Author: Jane Austen
ISBN: 9780141439518
Genre: Romance Year: 1813

Title: To Kill a Mockingbird Author: Harper Lee
ISBN: 9780061120084
Genre: Fiction Year: 1960

Instructions (instructions.txt)

add title War and Peace; author Leo Tolstoy; ISBN 9780140447934; genre Novel; year 1869

add title Harry Potter and the Sorcerer's Stone; author J.K. Rowling; ISBN 9780590353427; genre Fantasy; year 1997
delete title Pride and Prejudice query title To Kill a Mockingbird query author F. Scott Fitzgerald save
Explanation
Add Records

Instruction: add title War and Peace; author Leo Tolstoy; ISBN 9780140447934; genre Novel; year 1869

This instruction adds a new book record:

Title: War and Peace
Author: Leo Tolstoy
ISBN: 9780140447934
Genre: Novel
Year: 1869

Instruction: add title Harry Potter and the Sorcerer's Stone; author J.K. Rowling; ISBN 9780590353427; genre Fantasy; year 1997

This instruction adds another new book record:

Title: Harry Potter and the Sorcerer's Stone
Author: J.K. Rowling
ISBN: 9780590353427
Genre: Fantasy
Year: 1997

Delete Record

Instruction: delete title Pride and Prejudice

This instruction deletes the book record with the title "Pride and Prejudice" from the library system.

Query Records

Instruction: query title To Kill a Mockingbird

This query retrieves the book record(s) with the title "To Kill a Mockingbird".

Instruction: query author F. Scott Fitzgerald

This query retrieves the book record(s) authored by "F. Scott Fitzgerald".

Save Results to Files

The resulting data collection after executing add and delete instructions can be saved into a specified output file (output.txt).
The query results for each query instruction can be saved to a separate report file (report.txt). If there are multiple query commands, append the latest query results to the end of the report file and separate results of different queries using dashed lines.

Example Output
Output File (output.txt) after executing add and delete instructions

Records updated successfully.

Report File (report.txt) after executing query instructions

Query: title To Kill a Mockingbird

Title: To Kill a Mockingbird Author: Harper Lee
ISBN: 9780061120084
Genre: Fiction

Year: 1960

Query: author F. Scott Fitzgerald

Title: The Great Gatsby Author: F. Scott Fitzgerald ISBN: 9780141182636
Genre: Fiction Year: 1925

What do you need to submit?
All java source Code

Report:
The following sections:
Section 1: UML class diagram to show your design
Section 2: screen shots of your code to show some examples of adding comments to your code;
Section 3: screen shots of your code to show some examples of how to handle exceptions;
Section 4: screen shots of your running program with at least 5 test cases to show examples of adding, deleting, updating and querying.

Reference no: EM133751795

Questions Cloud

Provide examples of how the strategies could be implemented : Provide examples of how these strategies could be implemented to create agents of social change and achieve social justice.
Evaluate what children learn from stem related activities : GDECE107 Early Childhood Education, Graduate Diploma in Early Childhood Education - Evaluate what children learn from STEM related activities and how it links
Identify three items in the data that reflect inequalities : Identify three items in the data that reflect inequalities in education. How do inequities in education impact the learning of students of color?
How it gets in the soil water etc and affects human health : How it gets in the soil, water, etc and affects human health because of that causing disease. no big complex words please. just explain why its an issue.
Write a program consisting of multiple objects : ICT711 Programming and Algorithms, KOI Write a program consisting of multiple objects which interact with each other by following appropriate design practices
How does long- and short term financial planning impact you : How does long- and short term financial planning impact you personally and what impact does long- and short-term financial planning have on professional role?
How unique challenges and dynamics of healthcare influence : How the unique challenges and dynamics of healthcare settings might influence the suitability and effectiveness of different leadership styles.
How transformational leadership effectively address upstream : How can transformational leadership effectively address upstream factors such as social, environmental, political, and moral structures, including racism, to br
Write a report on the cpu scheduling algorithm : COMP2240 Operating Systems, University of Newcastle - Understanding and ability to successfully implement, execute and compare the results of a number

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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