|
1.Create an IceCreamConeException class whose constructor receives a string that consists of an ice cream flavor and number of scoops.
2. Create an IceCreamCone class with two fields:
• IceCreamFlavor
• Scoops
3. The IceCreamCone constructor calls two data-entry methods:
• GetFlavor(), which throws an IceCreamConeException if the flavor isn’t one of the following: vanilla, chocolate, strawberry, peach, or banana.
• GetScoops(), which throws an IceCreamConeException when the scoop quantity exceeds 3.
4. Create a program that establishes several IceCreamCone objects and handles any throw IceCreamConeExceptions.
5. Save your program.
6. Now “build” your program
Can sumone plz help me with this..its urgent....
hey
|
|
|
|
|
shaheen13 wrote: Can sumone plz help me with this..its urgent....
No, it homework. Go do it yourself!
|
|
|
|
|
shaheen13 wrote: 1.Create an IceCreamConeException class whose constructor receives a string that consists of an ice cream flavor and number of scoops.
2. Create an IceCreamCone class with two fields:
• IceCreamFlavor
• Scoops
3. The IceCreamCone constructor calls two data-entry methods:
• GetFlavor(), which throws an IceCreamConeException if the flavor isn’t one of the following: vanilla, chocolate, strawberry, peach, or banana.
• GetScoops(), which throws an IceCreamConeException when the scoop quantity exceeds 3.
4. Create a program that establishes several IceCreamCone objects and handles any throw IceCreamConeExceptions.
5. Save your program.
6. Now “build” your program
Can sumone plz help me with this..its urgent....
Not sure about the rest of it, but Ctrl+S will help with step 5 and Ctrl+B should get you past step 6.
Good luck with the others. Be sure to post back with the grade you get!
Knowledge is hereditary, it will find its way up or down.
Luc Pattyn
and since what every time when i want to add button to this control one add two times
posted in C# forum
|
|
|
|
|
Malcolm Smart wrote: 1.Create an IceCreamConeException class whose constructor receives a string that consists of an ice cream flavor and number of scoops.
2. Create an IceCreamCone class with two fields:
• IceCreamFlavor
• Scoops
3. The IceCreamCone constructor calls two data-entry methods:
• GetFlavor(), which throws an IceCreamConeException if the flavor isn’t one of the following: vanilla, chocolate, strawberry, peach, or banana.
• GetScoops(), which throws an IceCreamConeException when the scoop quantity exceeds 3.
4. Create a program that establishes several IceCreamCone objects and handles any throw IceCreamConeExceptions.
5. Save your program.
6. Now “build” your program
Can sumone plz help me with this..its urgent....
Not sure about the rest of it, but Ctrl+S will help with step 5 and Ctrl+B should get you past step 6.
Good luck with the others. Be sure to post back with the grade you get!
Good advice. Of course, I'm disturbed at how poor the requirements are for this. For instance, a constructor calling either a poorly named method, or a really dodgy implementation. I'm sorry, but this whole mess would need to be redesigned and the tutor will be awarded an F for this very poor design.
|
|
|
|
|
Agreed. Poorly designed assignment, starting bad habits early.
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
Malcolm Smart wrote: and since what every time when i want to add button to this control one add two times
Can you give me an original link to that gem?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
shaheen13 wrote: Can sumone plz help me with this..its urgent....
Sure. When you come round to my house and paint the kitchen for me - oh, and weed the garden. Then I'll code it up for you.
|
|
|
|
|
I see where you're coming from Pete but I think you're being a bit harsh... Gone are the days when students would be in class, make some notes, read the handouts, read the recommended text books, look at API documentation, or even ask the tutor. Where would we all be without google and code project hey!?
|
|
|
|
|
nelo_ wrote: I see where you're coming from Pete but I think you're being a bit harsh... Gone are the days when students would be in class, make some notes, read the handouts, read the recommended text books, look at API documentation, or even ask the tutor. Where would we all be without google and code project hey!?
You're right. It's far too harsh for me to expect somebody to actually be able to do something for themself. Obviously, my plumber just asks for somebody else to come and fit the bath for me, and he in turn asks somebody else - I suspect that there's only one plumber doing everybody's work for them. This explains why nothing ever gets done - that poor sod's far too busy.
|
|
|
|
|
Pete O'Hanlon wrote: I suspect that there's only one plumber
And he is actually the original poster, trying to cross train to be a developer!!
I'm sorely tempted to take you up on your painting / weeding offer though Pete, I'm so far behind with this project it's untrue. I'm packing the kids and wife off you with paint brushes and spades in hand.
Knowledge is hereditary, it will find its way up or down.
Luc Pattyn
and since what every time when i want to add button to this control one add two times
posted in C# forum
|
|
|
|
|
Malcolm Smart wrote: I'm sorely tempted to take you up on your painting / weeding offer though Pete, I'm so far behind with this project it's untrue. I'm packing the kids and wife off you with paint brushes and spades in hand.
Cool. When will I expect them? Have you posted them first or second class?
|
|
|
|
|
Well, the poster's profile claims that Job Title is Engineer. I'm glad we're working on ice cream and not skyscrapers. If that's the claim, then maybe some harshness is in order. If he/she needs homework help at the last minute "plz urgent", google can give results in under a second. Problem better phrased as "I'm having trouble understanding try/catch and making custom exceptions. Does anyone have a simplified explanation, my text is convoluted and the examples I've found on the net are not making much sense to me." Posted with the utmost respect for Mr. nelo_.
"Run for your life from any man who tells you that money is evil. That sentence is the leper's bell of an approaching looter." --Ayn Rand
|
|
|
|
|
nelo_ wrote: I see where you're coming from Pete but I think you're being a bit harsh... Gone are the days when students would be in class, make some notes, read the handouts, read the recommended text books, look at API documentation, or even ask the tutor. Where would we all be without google and code project hey!?
I don't think Pete's being too harsh at all. You're right, "gone are the days when students would..." and that's the problem. The problem isn't resources like Google and CP. The problem is that students expect instant answers and other people to do their homework because they can't be bothered to learn the material and the professors (and/or tutors) are more than happy to teach to this increasingly downward trend.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
Don't be too flippant, Pete. It's an urgent query, if you haven't noticed it yet.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: It's an urgent query, if you haven't noticed it yet
And I urgently mocked it. There was no delay, no flim flam. The mockery was instant.
|
|
|
|
|
|
Hi,
i'm trying To Display a Notification Form To the User Telling him that tha App is loading
Sql DataBase.
The frmLoading Load From Contains Label that states "Please Wait While Loading"
but when the Form Loads it do not shows me the Label and the Cursor over the Label is in
TimeClock Mode Like it's Waiting For Something!!!!,
The Thing is that The From is Active and can Be Moved
The Operation of The Fill Methods Takes Very Small Time Slice if The Connection Succeded
so the Form is immediatly Closed after Shown.
if the Loading Was Not Succesful
The Fill Methods Will Wait For A While if the Connection To SQL Server Could Not Be Done
The Point of the Form is to Give the User the Feeling That Something is Happening
I've tried a Thread But Got The Same resaults
Help AnyBody
Here is The Code :
<br />
try<br />
{<br />
frmLoading Load = new frmLoading();<br />
Load.Show();
<br />
TA_OCards.Fill(dS_CarManager.T_OpenCards);<br />
TA_CCards.Fill(dS_CarManager.T_ClosedCards);<br />
TA_Dest.Fill(dS_CarManager.T_Destinations);<br />
TA_Users.Fill(dS_CarManager.T_Users);<br />
TA_CDetails.Fill(dS_CarManager.T_CarDetails);<br />
<br />
Load.Close();<br />
<br />
}<br />
catch<br />
{<br />
MessageBox.Show("Server is Not Connectet, Please Try Later", "DataBase Error");<br />
this.Close();<br />
}<br />
<br />
Have Fun
Never forget it
|
|
|
|
|
If you get thrown into the catch block, you don't end up closing the fmrLoading form. Try rewriting this as:
using (frmLoading loading = new frmLoading())
{
loading.Show();
try
{
TA....
}
catch ( SomeAppropriateException here )
{
this.Close();
}
loading.Close();
} As a general note, try wrapping your code blocks in pre instead of code tags and don't catch general exceptions without actually attempting to catch more specific exceptions before hand.
|
|
|
|
|
THANKS ALOT
Have Fun
Never forget it
|
|
|
|
|
Hi
I have a picklist of 68 items. This is returned from a web service as a picklist. I would like to display the items from the picklist in a datagrid.
I have added the picklist items to an array then tried to display the array in the datagrid. Unfortunatly Im nto getting anywhere.
Heres my code
m_AddressList = base.AddressPickList;
PicklistItem[] atItems = m_AddressList.Items;
gridAddresses.DataSource = atItems;
It all builds, but nothing is displayed.
I would appreciate any help.
Thanks in advance.
|
|
|
|
|
is this ASP.NET? Have you tried calling DataBind() on the grid?
|
|
|
|
|
Hi Thanks I had just realised that I had missed
gridAddresses.DataBind();
Helps!!
thanks for your help
|
|
|
|
|
Is there a way to run a potentially long operation at shutdown while (displaying progress and the ability to cancel to the user). Something like the synchronising folders that happens after the user has shutdown on a domain computer.
I do not want to prevent shutdown or anything like that, just allow my application to finish any necessary processing as part of the shutdown process.
|
|
|
|
|
Hi!
You'll have to subscribe to the (static) SessionEnding event of SystemEvents class and perform your operation in the corresponding event handler.
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thanks, I have tried hooking that event and I can start the process when I receive the event but I only have a limited time (very short) to respond before Windows displays a dialog saying the aplpication has not closed (the one with the progress ticking down and "End Now" button), this would not be acceptable. I was hoping there was a way to run a long operation after the user session has ended but before the machine has shut down, such as the offline files synchronisation process in Windows.
|
|
|
|