473,320 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

home work

Hello, guys. this is a homework, could someone give some hint to me.
Assume you are about to design a class that reads a configuration file
from disk and provides some functions that can be called by other
classes to inquire the user settings that was provided in the
configuration file. The public parts of the class could look something
like this:
class ConfigurationFile
{
public:
ConfigurationFile(const char* filename);
~ConfigurationFile();
const char* GetValue(const char* name);
};

A number of fault conditions may arise when using this class. Describe
them and how you would design the fault handling for each one of them
in the class. Provide a convincing rationale for each choice.

Mar 24 '06 #1
2 1496

<xl*******@gmail.com> schrieb im Newsbeitrag
news:11**********************@z34g2000cwc.googlegr oups.com...
Hello, guys. this is a homework, could someone give some hint to me.
Assume you are about to design a class that reads a configuration
file
from disk and provides some functions that can be called by other
classes to inquire the user settings that was provided in the
configuration file. The public parts of the class could look
something
like this:
class ConfigurationFile
{
public:
ConfigurationFile(const char* filename);
~ConfigurationFile();
const char* GetValue(const char* name);
};

A number of fault conditions may arise when using this class.
Describe
them and how you would design the fault handling for each one of
them
in the class. Provide a convincing rationale for each choice.

If you want us to do your homework, be pretty sure that:
a) your tutor will obviously see that you didn't do it yourself
b) we will be happy to write code you won't understand within next 2
years.
So, do yourself a favour, do your homework. If you experience problems
come again with these.
-Gernot

Mar 24 '06 #2
In message <11**********************@z34g2000cwc.googlegroups .com>,
xl*******@gmail.com writes
Hello, guys. this is a homework, could someone give some hint to me.
Assume you are about to design a class that reads a configuration file
from disk and provides some functions that can be called by other
classes to inquire the user settings that was provided in the
configuration file. The public parts of the class could look something
like this:
class ConfigurationFile
{
public:
ConfigurationFile(const char* filename);
~ConfigurationFile();
const char* GetValue(const char* name);
Ask your instructor why they are setting a bad example by not making
this a const function.
};

A number of fault conditions may arise when using this class. Describe
them
There are three functions above. Why not start by describing what you
expect each of them to do? Then you should have no trouble thinking of
some things that might go wrong with each of them. When you've done
that, you will be in a better position to address the second part:
and how you would design the fault handling for each one of them
in the class. Provide a convincing rationale for each choice.


--
Richard Herring
Mar 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Ed | last post by:
Hello All, I posted earlier about a problem I was having with editing or pasting/deleting files in the "Home Directory" of my web server. I just noticed that the "Home Directory" option in the...
8
by: Carl | last post by:
I am sure this has been asked many times. But I haven't a clue where to find this information. I understand that Win XP Home does not support IIS. I have heard of a workaround but frankly I am...
1
by: richard turner | last post by:
Access 97 is running on an XP Home machine pulling up a database on an XP Pro machine. The XP Home machine has 512 megs of RAM, the XP Pro machine has 768 megs. Access 97 runs fine on both...
1
by: Tim Regan | last post by:
Hi All, I'm writing an app using WebRequest in csharp. I need the app to respond to the host PC moving from one network to another, e.g. taking a laptop home after work. Currently the...
4
by: Nate Hekman | last post by:
I can understand that one wouldn't be able to run a full-fledged web server from XP Home, but is there not a toned-down version of IIS/ASP.NET a developer can use on XP Home? I just bought a new...
16
by: Lance Wynn | last post by:
Hi all, I got a new computer that is running XP Home, and is to be used for the family as well as for me to do some work from home. I want to keep XP Home, but I am having a problem getting...
10
by: Jim Hurley | last post by:
I have an application that runs fine on XP Pro machines but usually doesn't work on XP Home. It doesn't crash or report any missing objects, it just doesn't communicate well. Not sure what the...
3
by: hscott93 | last post by:
Hello. I have a new Vista based laptop at work that connects to a Windows 2003 Small Business Server at work via an assigned, static IP address. When I take the laptop home, I have router that...
4
by: Jason Teagle | last post by:
I'm not sure which is the correct group to post this to, if either, so apologies for the crosspost and if it's OT. I have a Visual Studio.NET 2002-compiled solution that originated at work. At...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.