Java - Stack and Queue, Basic Computer Science

Assignment Help:
Consider a class called Configuration. This class “encapsulates” the configuration management
for any software system. For example, once created, the user can simply ask the configuration
object for value(s) to a certain configuration key. Let’s take a look at a few examples:
String filename = “config.txt”;
Configuration config = new Configuration( new File(filename) );
int numUser = config.getInteger( “num_users” );
String name = config.getString( “player1” );
In the above example, the config object is constructed and its contents are expressed in the file
config.txt. The format of the config.txt file is as followed.
key = value
key2 = value2
## lines with comments begins with the #
The complete Configuration class should implement the following methods:
Class Configuration {
// constructors
Configuration() { … }
Configuration( File file) { … }
Configuration(String filename) { … }
// accessors
int getSize() { … }
String getString( String key ) { … }
int getInteger( String key ) { … }
String[] getKeys() { … } // return all keys
// mutators
void push(String key, String value) { }
String[] pop() { } // returns String array[] = { key, value }
}
Your Configuration class will have two sub classes: (1) ConfigurationQueue and (2)
ConfigurationStack. The push and pop functions will behave differently depending on whether
your class is a Queue or a Stack.
Your App class is given and you should not change this class at all. Your homework will require
creating three files: Configuration.java ConfigurationQueue.java and ConfigurationStack.java.

Related Discussions:- Java - Stack and Queue

Software design, Ineed help to do my homework which is for designing of req...

Ineed help to do my homework which is for designing of requirenments.

Image processing, Image Processing: This technology is quite advanced ...

Image Processing: This technology is quite advanced and devices are now available for routine scanning and storage of printed pages, graphics, etc., which can then be retrieve

Data structuures, write a fuctions for MIDSQUARING hashing technique

write a fuctions for MIDSQUARING hashing technique

Software engineering, assignment 1:architectural design 2: component des...

assignment 1:architectural design 2: component design

Discuss on browsers for cloud computing, Question 1 Discuss on "Platform a...

Question 1 Discuss on "Platform as a Service" Question 2 Write a note on Accounting Services Question 3 Explain the different Software clients Question 4 D

Hardware basics, HARDWARE BASICS In the foregoing section of this Unit...

HARDWARE BASICS In the foregoing section of this Unit, an attempt has been made to explain to you the historic perspective relating to the development of computer from its ear

Fully describe the assessment centre method of selection, Problem: One ...

Problem: One large employer requests CVs from applicants, and, on the basis of these, invites a selected number to take part in a telephone interview. A date and time are provi

Algorithms and pseudocodes.., how do you write the algorithm and the pseudo...

how do you write the algorithm and the pseudo code for cramer''s rule in visual basic.

Decision table , No charges are reimbursed to the patient until the deducti...

No charges are reimbursed to the patient until the deductible has been met. Hospital visits are reimbursed at 80% and Lab visits are reimbursed at 70%. Doctor''s office visits are

Write Your Message!

Captcha
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