Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please Code this in Java language Q3. [20 marks: 10 for each method] Develop a class BackupRestore that has two static methods: public static int

please Code this in Java language
image text in transcribed
image text in transcribed
Q3. [20 marks: 10 for each method] Develop a class BackupRestore that has two static methods: public static int backup (String filename, double partsize) public static int restore (String filename, int numberofpieces) The backup method backs up huge files by splitting them into smaller pieces that may fit into storage devices with different capacities (e.g., 700mb for CD-Rs). The size of each piece is equal to partsize megabytes. The method creates the output files filename. 1 , filename. 2 , etc. and then returns an integer representing the number of files created. The restore methods does the opposite. It combines filename.1, filename.2, etc. into filename. The method returns an integer representing the total size of the file filename. In both methods, if an IOException occurs, display an error message and return - 1 . Use buffer classes to improve performance

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions