Diet Coke Leaked On to My MuVo2 1.
It was in my bag and the lid mustn't have been on properly.
Anyway the MuVo2 would not turn on and since it is 2 years old I took it apart completely and with a soft cloth gently patted dry any visible liquid I could see (not much) and left it for a few hours to get 'drying' air exposure.
Whilst disassembled I plugged it into the mains and lo and behold it powered up.
Got 'Creative' followed by 'MuVo' and then the dancing music notes ane then listed the last track that was playing.
I disconnected the power and attached the d-pad power switch assembly to to the small connector on the main circuit board, reconnected the power and let it boot up again.
Tried pressing play, nothing.
Tried naviagating, nothing.
I reassmbled and can connect it to the PC with no issues, ran a full scandisk and defrag and dragged some MP3s to it and then deleted tem all with no issue.
So it seems that just the d-pad / power switch assembly is not working or maybe not connected properly.
I really like the MuVo2 because of the replaceable battery.
Is it possible to order a replacement switch assmebly from Creative (Australia) or their repairer or any trick to making that connection that I'm missing.
I can get a MuVo2 5GB FM for about A$23 now but since the .5Gb I have cost me A$399 2 years ago I'd rather just replace the switch if possible.
Any suggestions welcome because at the moment, the MuVo2 just powers on but nothing else.
Can't even get into Recovery Console.
Well by yesterday afternoon the buttons had stopped working again.
I have sent an email to Creative Labs Australia asking if they can sell me the button assembly as it is a separate part to the rest of the player.
They came back and told me that repairs by anyone other that CL would void my warranty and told me to d/l the latest firmware and go through various procedures via the recovery menu.
Maybe they missed the part where I said it was almost 2 years old or that the buttons didn't work - I've sent them another email.
I have had one suggestion to soak it in distilled water and then dry put with a hair dryer <a href=http://discussions.virtualdr.com/showthread.php?t=97227 target=_blank>link[/url] but since it works other than the buttons, I'm loath to do that.
Anyone that has the FM remote, or a CL employee can you tell me does the remote have buttons on it that I could potentially use instead ?
Maybe I can pick one up on ebay.Message Edited by Nix on -6-2005 2:5 AM
Similar Messages
-
Got diet Coke into my macbook pro, but it still works
Hi all,
About 2 weeks ago diet coke got sucked into my MBP. I dried it out, took it to the apple store, got it checked out and it was kept over night to test; came back passing all the tests.
I have witnessed no decrease in speed and the only problem I've had since is I had to restart the computer a couple times due to the trackpad not working.
Is there a possibility of it dying down the road? I'd rather replace the computer with all my data in tact now than wait for the thing to die.
Thank you for your helpBe glad it wasn't regular Coke or flies could be a problem.
All kidding aside, your concern about failure is valid as the carbonic acid in fizzy drinks likely accelerates corrosion. Only time will tell how much damage can occur. I highly recommend that you create a bootable clone with SuperDuper or Carbon Copy Cloner in order to preserve your data in case of failure or need to troubleshoot.
http://lifehacker.com/5839185/the-best-disk-cloning-app-for-mac-os-x
http://www.bombich.com/
http://www.shirt-pocket.com/SuperDuper/SuperDuperDescription.html -
I spilled diet coke on my macbook
I spilled diet coke on the keyboard of my macbook. I do have AppleCare Protection. One, is this covered? If not, how do I clean the keyboard and ensure the computer is not wrecked.
Immediately disconnect all peripherals, power cord & remove the battery. Turn the computer over with the lid partly open and the hinge facing upward to let the liquid drain. Do not flop it over and lay it flat - you want to separate it from the moisture. Place paper or cloth towels under the machine to sop up the mess.
After the computer disgorges whatever you spilled on it, don't turn it on for 72 hours or longer. You want to computer to dry out completely before turning it on again.
Some users here swear by hairdryers. Blow drying the innards may bake whatever was in the liquid onto delicate computer components. Better to let the computer air dry.
Use plain tepid water to clean out the computer. If you spilled iced beverage more than likely this ice fried the hot motherboard.
Sugary, acidic or milky drinks will almost always cause problems later on as the residue starts slowly corroding the computer innards.
Swab down any sticky parts with distilled water or denatured alcohol.
If none of the above works, you will need to take the computer to a repair shop.
How to remove and clean your Macbook Pro Keyboard
Cleaning Macbook keys after a spill
Liquid damage is not covered under Apple's standard 1 year warranty or Apple Care.
NOTE: If you are out of warranty and purchased the computer with a credit card, discuss the warranty issue with the credit card company which you purchased the computer with. They are the only ones who can at this point cover the computer after it goes out of warranty with the manufacturer (Apple).
If you have Homeowners insurance, place a claim with them. -
are keyboards waterproof? Just spilled diet coke on it...dried with paper towels and shook it upside down...seems to be OK. Any suggestions?
lindafromnavarre wrote:
are keyboards waterproof?
Nooooooo!
Any suggestions?
shut it off, remove the battery if it can be, unplug it from any powersource and don't turn it on again until you get it looked at by a technician at the Apple store or an AASP. -
100+ Views & 0 Replies Can someone help me..?
Hello There,
Is it possible to delete Level 0 Members in a dimension using Rule files? I did read this thread (HOW can i delete the members in dim using MAXL and tried the Remove Unspecified option but it removes all the members in the dimension.
For Instance consider this Outline. Here Coke, Pepsi, Dr.Pepper, Sprite, Regular, Latte, French & Mocha are the ones which needs to be removed
Product<2><Never Share>
+Beverages<2>
-+ Soft Drinks <1>
--+ Soda<2>
----+ Diet<4>
-------+ Coke <Alias: 001 Diet Coke>
-------+ Pepsi <Alias: 002 Diet Pepsi>
-------+ Dr.Pepper <Alias: 003 Diet Dr.Pepper>
-------+ Sprite <Alias: 004 Diet Sprite>
----+ Regular<4>
-------+ Cokei <Alias: 005 Coke>
-------+ Pepsi <Alias: 006 Pepsi>
-------+ Dr. Pepper <Alias: 007 Dr. Pepper>
-------+ Sprite <Alias: 008 Sprite>
--+ Hot Drinks<1>
----+ Cofee<4>
-------+ Regular <Alias: 010 Regular>
-------+ Latte <Alias: 020 Latte>
-------+ French <Alias: 030 French>
-------+ Mocha <Alias: 040 Mocha>
+Fast Food
Please can some one help me.
Thanks in Advance+Natesh gave you the right advice -- to use the remove unspecified option you must provide a dimension build file/table/source that has all of the members you want but not the members you don't. The members you don't want are the ones that are not in the file -- they get deleted.
Have a read of this thread and see all of the links: Re: dropping a essbase cube member through Maxl Script
Regards,
Cameron Lackpour -
Unable to create attribute dimension in Essbase Studio
Hi All,
As per the process,I am create an Attribute for an dimension as below
Hierarchy
Family(gen1)
SKU(gen2)
Attribute1(gen1)
SKU(gen2)
Attribute2(gen2)
SKU(gen3)
Here the issue i am unable to create an 2nd attribute parallel to first on i mean attributes are not creating as sliblings.
Please advise
Thanks,
SatyaBI think I understand what you are asking. I think your example is something like
Products
---Colas
-----Coke
-----Diet coke
Bottle (attribute)
---Coke
Can (attribute)
---Diet coke
This is not the way attributes work, you would have a column in your soruce perhaps called container_type that has the relationship
Container_type
Sku
So the rows would look like
Sku----Family-----container_type----other properties
coke...Colas........Bottle............XXXXXX
Diet Code..Colas...Can.............XXXXXXX
This could be in your primary table or a joined table -
Custom sort pivot table columns with Essbase as the data source
Is it possible to sort columns in a pivot table according to an arbitrary value that I define when the data is coming from Essbase?
For example, say I have a dimension called Soda, with values Coke, Diet Coke, Dr. Pepper and Diet Dr. Pepper. I create a report with a sales measure with the measure labels on the rows and the Soda dimension on the column. By default the columns will be sorted alphabetically:
Coke Diet Coke Diet Dr. Pepper Dr. Pepper
Sales 1M .5M .75M 1.25M
I want to create a report that looks like this:
Coke Diet Coke Diet Dr. Pepper Dr. Pepper
Sales
I think I could do this if the source was relational just by creating bins or creating a custom column with a case statement that assigns each Soda an arbitrary value and then sort on this value. Everything I've tried with Essbase as the source, though, results in:
State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 42043] An external aggregate is found in an outer query block. (HY000)
Any ideas?Hi,
1. You can try solve the 'An external aggregate is found in an outer query block' by changing aggregation rule for your measure both in physical and business layer.
By default it's set to Aggr_External - change it to Sum
In physical : Column properties->Aggregation rule
In business model : Column properties->Aggregation tab -> Default aggregation rule.
This may change the result - after changing check whether you still get correct values.
2. Also, in case the desired order is the same as the order of members in the Essbase cube, and you want to leave Aggr_External, you can create a calculated column that will help you with the sort.
See http://oraclebizint.wordpress.com/2008/04/28/oracle-bi-ee-101332-handling-sort-order-in-hyperion-essbase-931-evaluate-and-mdx/
Hope this helps,
Alex -
Invalid Node structure/ computer running slow?
Hi everyone,
I recently dropped my even a couple of drops of diet coke near the DVD drive of my MacBook (2009).
Turned it off immediately and turned it upside down for a bit. Tune it back on and it worked fine. However, the second time I turned it on it wouldn't go past the login screen. Turned it off as then on again, and started up fine. Ran a disc diagnostic and it gave me the invalid node structure message. From there it started to run slow so I shut it off again. Haven't turned it on since. I'm thinking of taking it in to a shop since I don't want to mess with it anymore.
Is there any easy fix to this? If my hard drive is messed up, can I recover my data? I've never backed up (I know, I know..) so needless to say I'm a little stressed.
Thanks!That does sound stressful. Sorry to hear you have had these problems.
The good news is that you can probably get your data back. Follow the steps in this document to remove the hard drive from your MacBook. Put the hard drive in an enclosure - you can get these for about $10-15. Connect the hard drive to another Mac and see if it shows up on the desktop. If it does, extract the data.
After that, take the whole thing in to a shop to have them see if they can correct the liquid damage. This may or may not work.
Best of luck. -
How to load Time_Dimension
Hi,
I am very new to OWB(Datawarehousing) basically, I have some doubts in creating and loading the dimensions.
I was referring to the following website to learn
http://philip.greenspun.com/sql/data-warehousing.html
I created the following tables,
DDL & DML
create table product_categories (
product_category_id integer primary key,
product_category_name varchar(100) not null
create table manufacturers (
manufacturer_id integer primary key,
manufacturer_name varchar(100) not null
create table products (
product_id integer primary key,
product_name varchar(100) not null,
product_category_id references product_categories,
manufacturer_id references manufacturers
create table cities (
city_id integer primary key,
city_name varchar(100) not null,
state varchar(100) not null,
population integer not null
create table stores (
store_id integer primary key,
city_id references cities,
store_location varchar(200) not null,
phone_number varchar(20)
create table sales (
product_id not null references products,
store_id not null references stores,
quantity_sold integer not null,
-- the Oracle "date" type is precise to the second
-- unlike the ANSI date datatype
date_time_of_sale date not null
-- put some data in
insert into product_categories values (1, 'toothpaste');
insert into product_categories values (2, 'soda');
insert into manufacturers values (68, 'Colgate');
insert into manufacturers values (5, 'Coca Cola');
insert into products values (567, 'Colgate Gel Pump 6.4 oz.', 1, 68);
insert into products values (219, 'Diet Coke 12 oz. can', 2, 5);
insert into cities values (34, 'San Francisco', 'California', 700000);
insert into cities values (58, 'East Fishkill', 'New York', 30000);
insert into stores values (16, 34, '510 Main Street', '415-555-1212');
insert into stores values (17, 58, '13 Maple Avenue', '914-555-1212');
insert into sales values (567, 17, 1, to_date('1997-10-22 09:35:14', 'YYYY-MM-DD HH24:MI:SS'));
insert into sales values (219, 16, 4, to_date('1997-10-22 09:35:14', 'YYYY-MM-DD HH24:MI:SS'));
insert into sales values (219, 17, 1, to_date('1997-10-22 09:35:17', 'YYYY-MM-DD HH24:MI:SS'));
-- keep track of which dates are holidays
-- the presence of a date (all dates will be truncated to midnight)
-- in this table indicates that it is a holiday
create table holiday_map (
holiday_date date primary key
-- where the prices are kept
create table product_prices (
product_id not null references products,
from_date date not null,
price number not null
insert into product_prices values (567,'1997-01-01',2.75);
insert into product_prices values (219,'1997-01-01',0.40);
Created the Dimensions as below,
Time_Dimension
create table time_dimension (
time_key integer primary key,
-- just to make it a little easier to work with; this is
-- midnight (TRUNC) of the date in question
oracle_date date not null,
day_of_week varchar(9) not null, -- 'Monday', 'Tuesday'...
day_number_in_month integer not null, -- 1 to 31
day_number_overall integer not null, -- days from the epoch (first day is 1)
week_number_in_year integer not null, -- 1 to 52
week_number_overall integer not null, -- weeks start on Sunday
month integer not null, -- 1 to 12
month_number_overall integer not null,
quarter integer not null, -- 1 to 4
fiscal_period varchar(10),
holiday_flag char(1) default 'f' check (holiday_flag in ('t', 'f')),
weekday_flag char(1) default 'f' check (weekday_flag in ('t', 'f')),
season varchar(50),
event varchar(50)
Stores_Dimension
create table stores_dimension (
stores_key integer primary key,
name varchar(100),
city varchar(100),
county varchar(100),
state varchar(100),
zip_code varchar(100),
date_opened date,
date_remodeled date,
-- 'small', 'medium', 'large', or 'super'
store_size varchar(100),
Also created Product_Dimension ( with product and manufacturer information)
Fact Table
create table sales_fact (
time_key integer not null references time_dimension,
product_id integer,
store_id integer,
unit_sales integer,
dollar_sales number
Please let me know whether the design of Dimension and Fact is correct, And also please let me know how to populate/load the Time_Dimension
Regards,
Ashoka BL
[email protected]Hi,
Thanks for the valuable information. I will surely try the options suggested and get back if I face any more issues, Since i am learning Datawarehousing, would you suggest me any website(which will have a case study ,like having the source tables and building the facts and dimensions for it)
Regards,
Ashoka BL -
Photo stream pics are sideways. But only PEOPLE!
This is weird. Some pics show up in the photostream folder on my PC correctly. Others show up sideways. Of those that are sideways, some can be rotated and some give me an error that it can't be saved. Which ones can't? The ones that have people in them. I'm not kidding. I just went through 20 photos. If there is a person in the pic it can't be rotated. If there are people in the distance I can rotate. I have a pic of a chimp. That rotated. I have a pic of a goat, that rotated. A pic of a diet coke can rotated. There is some voo doo magic going on here. there is facial recognition at play here. What have I stumbled across here?
Upload to the shared Photo Streams can take a long time. Sometimes hours. Did the photos appear by now in the stream?
Is the iCloud status o.k. ( iCloud Support webpage)?
Did you share from your mac or from a mobile device? And where are you checking the stream? On your Mac? If you are uploading from a mobile device - is the battery fully charged? Uploading to the Photo Stream is the first that will be suspended, if the device needs charging.
have ypu exceeded any limits? Daily hourly upload rates? http://support.apple.com/kb/HT4858
Regards
Léonie -
Incomprehensible error (regex)
Hi all,
There I was, happily tap-tapping away in Java, sipping on my Diet Coke and wondering if tonights episode of The Simpsons would be one I'd seen or not, when blam!.....Up pops this error, which means nothing to me (since I've not really covered regular expressions yet).
java.util.regex.PatternSyntaxException: Dangling meta character '+' near index 0
+
^
at java.util.regex.Pattern.error(Pattern.java:1528)
at java.util.regex.Pattern.sequence(Pattern.java:1645)
at java.util.regex.Pattern.expr(Pattern.java:1545)
at java.util.regex.Pattern.compile(Pattern.java:1279)
at java.util.regex.Pattern.<init>(Pattern.java:1035)
at java.util.regex.Pattern.compile(Pattern.java:779)
at java.lang.String.replaceAll(String.java:1663)
at Utility.stripOut(Utility.java:47)
at TryUtility.main(TryUtility.java:14)
Exception in thread "main"
The code in question is this: -
String sString = "+02:00";
sString = Utility.stripOut(sString, "+");
System.out.println(sString);...using this static method....
// Strips out all occurances of sWhat from string sFrom.
public static String stripOut(String sFrom, String sWhat) {
if ((sFrom == null) || (sFrom.length() < 1) || (sWhat.length() < 1)) {
return null;
} else {
return sFrom.replaceAll(sWhat, "");
}All it should do is strip out a chosen character or string from another string and return the modifed result. Shouldn't be too hard :)
BTW, line 47 from the stacktrace is the method return line of the stripOut() method and line 14 is the calling line from the execution code.
I don't really see what the problem is with stripping out the '+' sign from the String, but as I said, I've not really done much with reg expressions yet, so any advice / info would be useful.
Thanks.Thanks very much guys.....I didn't realise that using replaceAll actually fell within the realms of regular expressions. :)
-
Help with college assignments ( Please )
Hi,
I am new both to Java and programming as a whole. I did a bit of client side scripting during the dot com hey day ( last year ). Recently I signed up on bachelors degree course and this semester is focusing on Java. As I cannot get hold of my lecturer more than once a week I am hoping I can use this forum as resource for my weekly assignments. I am not looking for specifically for code, rather a resource to bounce ideas to formulate into code myself. I have come to agree with my lecturer that a well structured pesuedocode would help to brain storm for the actual java code.
Therefore it is the pesudocode that I would like to discuss in this forum. Another important factor would be not to use any fancy classes or methods for my assignment. Not at this early stage anyway. It does not matter using tens of if statements even if there was a quicker solution. I need to understand the logic first.
If I am in the wrong forum I would be grateful if you could point to more suitable forums.
On the other hand if you can help please let me know so that I can detail my latest assignment based on a vending machine.
Incidentally, I understand there is a nice freebie text editor called jdeveloper. I have done search for it but not come up with anything. Any ideas.???
I thank you in advance for your support and co-operation.
Sincerely
Siavash SefidvashHello,
Thanks for you kind offer of assistance. As mentioned already I find learning the logic of psuedo codes helps a great deal in formulating the java code. My current level is not much beyond "IF" statements and a bit of for/while loops. I am using the EasyIn method without really knowing how it works. I already have attempted code for this, but would like feedback regarding the psuedo code first. I will post the code in a seperate post.
1. At command prompt select either of keys, p, c, f, s, d.
2. "if" the selection is c
3. Print out a coke prompt.
4. Print out to screen " Enter amount you want".
4. Enter an integer for the amount.
5. Subtract or decrement the amount from stock.
6. Print out updated stock on screen.
7. "if" p is selected
8. Print out a pepsi prompt.
9. Take in an integer for the amount required.
10. Subtract or decrement from stock.
11. Print out the updated stock.
12. if" the selection is f
13. Print out a fanta prompt. Possibly with a text saying " Enter amount you want".
14. Enter an integer for the amount.
15. Subtract or decrement the amount entered from stock.
16. Print out updated stock on screen.
17. "if" s is selected
18. Print out a Sprite prompt.
19. Take in an integer for the amount required.
20. Subtract or decrement from stock.
21. Print out the updated stock.
23. "if" d is selected
24. Print out a Diet Coke prompt.
25. Take in an integer for the amount required.
26. Subtract or decrement from stock.
27. Print out the updated stock.
23. "if" E is selected
24. Exit program.
/* This application is a vending machine selling five types of soft drinks. I.e. Pepsi,Coke, Fanta, Sprite, Diet Coke.
The machine stocks 50 cans of each drink. The application is to subtract or decriment and up date the stock as the
products are bought. */ -
NEED: InDesign/DPS expert for Funny Or Die's iPad & iPhone magazine The Occasional
Hello!
We are looking for a InDesign expert for Funny Or Die's iPhone and iPad comedy magazine, The Occasional.
Lets get to the facts:
>>>>>> ABOUT OUR OUR TEAM:
A very small team that works fast on new ideas.
Passionate about putting out a great product.
Located in New York's Flatiron district.
>>>>>> WHAT WE WANT IN YOU:
> INDESIGN/DPS EXPERT: "I kinda have used InDesign before once in school?" Nope, I am talking you know the ins and out of InDesign DPS BIG TIME. You know all the interactive features and how to use them correctly. You know the DPS bugs already and the work arounds to get the job done. You can layout text and import pre-optimized image for the smallest folio size possible.
> PHOTOSHOP PRO: I can give you a PSD layout and you can go into the file, and cut it up and translate it to InDesign for a flawless victory.
> CODE CHAMPION: We animate the magazine using javascript and HTML 5. You will need to be able to take the assets and make them move awesomely. (We use Hype)
> GREAT ATTITUDE: A yes attitude is a must. You will receive challenges, some without an obvious answer. But a yes attitude knows to research and figure out a way to get it done.
> HARD WORKER: So, you know-- magazines mean deadlines. And sometimes deadlines suck. But we will need a person to be there sometimes all hours of the night to get projects done.
> DETAIL ORIENTATED: You notice the little design flare and animated around it. You can be given a list of notes and nail everyone without us needing to go back and double check everything. You notice the 1 pixel off on the layout and want it fixed. You notice how many misspellings I have in this ad, probably.
> VERY ORGANIZED: Lists on lists on lists. You make your own todo lists. The inside of your files are clean and labeled perfectly so a stranger could pop in and understand everything completely.
> COMMUNICATION: You have a question? Ask us! You have a suggestion? Suggest it to us! We need someone who is ready to talk it out so it can be done right the first time.
> STOKED TO BE HERE: This job is awesome. We want you to be stoked to be here. We are.
>>>>>> PERKS:
> RESPECT: You prove you can get the job done and we let you do it.
> BEST TOOLS: You want new software to help out? Sure. Top of line laptop? No problem. Want something else crazy? LETS GET CRAZY.
> COMPANY CULTURE: We ain't no chumps. We try our best to have a good time and leave the watercooler talk & office politics out of it.
> DIET COKE: We have tons of it.
> EVENTS: Neat events from time to time. Company outings from time to time. Stuff of that nature.
> THE EXTRA GOODIES: Medical, dental, life, vision insurance, 401k, blah blah blah.
>>>>>> INFORMATIVE SENTENCE ABOUT THE COMPANY:
Funny or Die is a comedy brand for the 21st century. We produce hilarious, premium-quality, celebrity-based content for the web, TV, film, mobile, live events, and more. Our website, founded in April of 2007, is the #1 comedy destination online.
>>>>>> HOW TO APPLY:
Send me over some examples of InDesign development and if possible HTML animation. Make sure to tell me about the projects and how you worked on them. Also include a little something about yourself and why you think you are a good fit for Funny Or Die and The Occasional.
email: [email protected] / subject: InDesign Developer JobLocked. Please contact the OP directly.
Bob -
Swing action events....a moment of doubt.
Here I am, merrily hammering away on my first Swing application, listening to Pink Floyd "Shine On You Crazy Diamond" on my MP3 player, Diet Coke on hand, when my typing pauses and a fearful dread overtakes me.....
I'm implementing the AbstractAction interface in one of my classes ("MainAction") because I want to share these events with a toolbar and some menu items. All well and good. However, how do you usually distinquish between different components when entering the actionPerformed method? I'll admit I know very little about the ActionEvent object, so if you want me to RTFM I won't hate you. :)
At the moment I'm using the setActionCommand() to give the component its unique identity and then checking for this using: -
public void actionPerformed(ActionEvent e) {
if (e.getActionCommand().equals("SOME_UNIQUE_STRING")) {
// Do something here.
}Its just that I've got a horrible idea that this is a really bad way to do it (based on no evidence at all, BTW). All the documentation I've read only deals with events for one button or something, while I'd like a way to distinquish between, say, two buttons.
Don't get me wrong, the way I've done it works fine.....so I've no real problem. But if I'm doing things badly, I'd like to know now before I get too far down the development road with this.
Thanks for any insights. :) Sorry if this is confusing between Actions and ActionListeners........I've only really used Actions at the moment and am not really at the stage where I have to use ActionListeners or anything like that just yet (Although I probably will get to that tomorrow).OR have a different Listener for each event source instead of just making the Panel implement ActionListener.
That feels more object-oriented to me. "if/then/else" is usually a sign that you could rework the design to take better advantage of objects.
The downside is that you have to write more objects. Clients of your code will have to look in more places to understand what you're doing.
I like this approach because it decouples the GUI from what's done. If you give your UI class a constructor that takes the appropriate Listeners as arguments you can completely decouple the View from the Controller. I like that, too. Now you can keep the same UI and change what's done simply by passing in different Listeners.
Just thought I'd offer this as another idea. It's not commonly presented in books.
MOD -
I am very new to java. and i am taking it in university 1st year.. now.. we have labs to do but they dont tell us how to do em, they tell us to just do em... could someone please help me?
public class FoodItem {
private String description;
private double size;
private double price;
// Methods
// postcondition: creates a new object with data field
// values as specified by the arguments
public FoodItem(String desc, double aSize, double aP)
description = desc;
size = aSize;
price = aP;
// postcondition: sets description to the argument value
public void setDesc(String desc)
description = desc;
// postcondition: sets size to the argument value
public void setSize(double aSize)
size = aSize;
// postcondition: sets price to the argument value
public void setPrice(double aPrice)
price = aPrice;
// postcondition: returns the item description
public String getDesc() {
return description;
// postcondition: returns the item size
public double getSize() {
return size;
// postcondition: returns the item price
public double getPrice() {
return price;
// postcondition: returns a string representing the item state
public String toString() {
return description + ", size : " + size +
", price $" + price;
// postcondition: calculates and returns the unit pric
public double calcUnitPrice() {
return price / size;
now... that is what i have... but.... how do i do thesE?
a) Add a data field to store the total calories in a food item to the class
FootItem.
b) Add the methods setCal() and getCal().
c) Add a default constructor with no argument.
d) Add a constructor with two arguments: description and calories.
e) Add a constructor with 4 arguments: description, size, price, calories.
f) Modify the method toString() to return a string representing the state of an
object of class FootItem.
g) Modify class TestFoodItem to declare and create a new FootItem object
called dietCoke using the default constructor. Use the setter methods to
store the information that represents a 250 ml diet Coke that cost $1.25
with zero calories.
h) Modify class TestFoodItem again to add another object to represents a 250
ml regular Coke that cost $1.25 with 110 calories. Use the four parameters
constructor.
i) Display the attributes of these two objects.
If noone will help me with them... thats fine, it's totally up to you. I just do not understand any of this... i cannot find any of it in the notes.... and there is no text book..... any and all help is appreciated.how do i add a default constructor with no argument?
public FoodItem() {
// but what goes here?
}To figure out what the body of the constructor would be ask
yourself what would happen if you don't initialise description, size, price
as you did in the other constructor. (Give them initial values)
Is it a problem at all? (Test and see)
If it is what can you do about it?
Maybe you are looking for
-
Purchase order status tab(header data) field correction program
Hi, Is there any correction program to correct status tab header details(purchase order - ME23N) ? There is a mismatch between order quantity,delivered quantity & still to deliver quantity, I want to correct these data. Please respond, if any thing c
-
Family Pack...posting iWeb from multiple computers?
So I apologize if this is a silly question...but need to verify my hunch. If I purchase a .mac family pack, can we post multiple iWeb sites from each of our four computers to that .mac account? So the sites would be, for example, web.mac.com/smithfam
-
Trouble downloading Flash Player 10 to Mac using 10.6.4
I have tried several times to download the program. After each attempt I get a message that says download successful but nothing seems to work. The program is listed in my progam files. Help!
-
Is Adobe Acrobat 11 Standard compatible with a Mac Mini?
Can I use Adobe Acrobat 11 Standard on my Mac Mini?
-
Bridge CC (mac) does not display EXIF metadata info of my camera
below is the screen shot of the error: i deleted CC prefs, uninstalled/reinstalled, tried many things. problem persists. any ideas, can you please help? by the way, it does not display TIFFs: thanks in advance, murat