Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9624177

Have any Question?


Related Questions in Computer Engineering

Question based on what you learn from the vignette what do

Question: Based on what you learn from the vignette, what do you think are the relationships between Web analytics, text mining, and sentiment analysis? The response must be typed, single spaced, must be in times new rom ...

Mccann co has identified an investment project with the

McCann Co. has identified an investment project with the following cash flows. Year Cash Flow  1     $800   2    1,090   3    1,350   4    1,475  a. If the discount rate is 7 percent, what is the present value of these c ...

The expectations theory suggests thata the slope of the

The expectations theory suggests that a.) the slope of the yield curve reflects the risk premium incorporated into the yields on long-term bonds. b.)the yield curve should usually be upward-sloping. c.)the slope of the y ...

Question the redblue computation simulates two interactive

Question : The Red/Blue computation simulates two interactive flows: an n × n board is initialized so cells have one of three colors: red, white, and blue, where white is empty, red moves right, and blue moves down. Colo ...

Assignment week 3 create a scrum boardprojects that conform

Assignment: Week 3 Create a Scrum Board Projects that conform to the Agile methodology often use something called a scrum board. You can think of a scrum board as a digital whiteboard containing yellow "stickies," each l ...

What effect does the teacher have on creating a learning

What effect does the teacher have on creating a learning environment with little to no behavior problems?

Assignment from chapter 10 page 302 web-based case read and

Assignment: From Chapter 10, page 302, Web-Based Case. Read and answer the questions. KNOWLEDGE MANAGEMENT SYSTEMS AND CRM In answer to the challenges Nelnet faces in servicing a growing volume of student loans, the comp ...

Biodiversity refers to the variety of living organisms

Biodiversity refers to the variety of living organisms found within an ecosystem. In your description, evaluate the role of humans in the current biodiversity loss situation and increased species extinction rate. In addi ...

Two people agree to meet at a coffee shop they each

Two people agree to meet at a coffee shop. They each independently pick a random moment in time between 8 a.m. and 9 a.m. and show up exactly at their selected time. But they are very impatient, and only stay for 10 minu ...

Query to reterieve data from a customers table in mysql for

Query to reterieve data from a customers table in MySQL for instance who have not placed any orders yet, How to sort results by customers number,How to Modify the query to list customers who have placed fewer than five o ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As