Jump to content

Recommended Posts

Posted
sSa_j@il sSa_j@il neeku kotthaga undha mama?[quote name='Silver_mani' timestamp='1344039865' post='1302254701']
neekem anipiyyatleda ? [img]http://i56.tinypic.com/2w2r5gm.jpg[/img][img]http://i56.tinypic.com/2w2r5gm.jpg[/img][img]http://i56.tinypic.com/2w2r5gm.jpg[/img]
[/quote]
  • Replies 103
  • Created
  • Last Reply

Top Posters In This Topic

  • hava

    44

  • cherlapalli_jailer

    17

  • soulmate

    11

  • Aamayakudu

    7

Top Posters In This Topic

Posted

hava i sent u another example

to test try that

Buvvu opt chesukunna example lo lgic abstraction ki teesuku velli danni extend chese anthe ledu coz simple add and sub kabatti

what u did is correct finsh this example and ggoto to next one

Posted

[quote name='cherlapalli_jailer' timestamp='1344039978' post='1302254709']
tell what u want
[/quote]
mama nenu operations class lo methods implement chesa mama add and subtract rendu chesa.... but oka error osthundi mama..."The type Operations must implement the inherited abstract method Calc.add(int, int)"

P.S nenu Subtraction method ni abstract Calc class lo implement chesa and I declared it as a Non Abstract method :(

aa error ela pogottali maam :(

Posted
CITI_y@R CITI_y@R [quote name='cherlapalli_jailer' timestamp='1344040276' post='1302254717']
hava i sent u another example

to test try that

Buvvu opt chesukunna example lo lgic abstraction ki teesuku velli danni extend chese anthe ledu coz simple add and sub kabatti

what u did is correct finsh this example and ggoto to next one
[/quote]
Posted

[size=6][b][color="#7f0055"][color="#7f0055"]package[/color][/color][/b][/size]


[size=6]Calculator;[/size]

[size=6][b][color="#7f0055"][color="#7f0055"]public[/color][/color][/b][/size]


[size=6][b][color="#7f0055"][color="#7f0055"]class[/color][/color][/b] Oparations [b][color="#7f0055"][color="#7f0055"]extends[/color][/color][/b] Calc {[/size]

[size=6][b][color="#7f0055"][color="#7f0055"]public[/color][/color][/b] [b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] add([b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] num1, [b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] num2)[/size]
[size=6]{[/size]

[size=6][b][color="#7f0055"][color="#7f0055"]return[/color][/color][/b] num1 + num2 ;[/size]

[size=6]}[/size]

[size=6][b][color="#7f0055"][color="#7f0055"]public[/color][/color][/b] [b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] sub([b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] num1, [b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] num2)[/size]
[size=6]{[/size]

[size=6][b][color="#7f0055"][color="#7f0055"]return[/color][/color][/b] num1 - num2 ;[/size]

[size=6]}[/size]
[size=6]}[/size]

Posted

[size=6][b][color="#7f0055"][color="#7f0055"]package[/color][/color][/b][/size]


[size=6]Calculator;[/size]

[size=6][b][color="#7f0055"][color="#7f0055"]public[/color][/color][/b][/size]


[size=6][b][color="#7f0055"][color="#7f0055"]abstract[/color][/color][/b] [b][color="#7f0055"][color="#7f0055"]class[/color][/color][/b] Calc {[/size]

[size=6][b][color="#7f0055"][color="#7f0055"]public[/color][/color][/b] [b][color="#7f0055"][color="#7f0055"]abstract[/color][/color][/b] [b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] add([b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] num1,[b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] num2);[/size]

[size=6][b][color="#7f0055"][color="#7f0055"]public[/color][/color][/b] [b][color="#7f0055"][color="#7f0055"]abstract[/color][/color][/b] [b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] sub([b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] num1,[b][color="#7f0055"][color="#7f0055"]int[/color][/color][/b] num2);[/size]



[size=6]}[/size]

Posted

and try the test classes i sent
useing above 2 classes

Posted

[quote name='hava' timestamp='1344040282' post='1302254718']
mama nenu operations class lo methods implement chesa mama add and subtract rendu chesa.... but oka error osthundi mama..."The type Operations must implement the inherited abstract method Calc.add(int, int)"

P.S nenu Subtraction method ni abstract Calc class lo implement chesa and I declared it as a Non Abstract method :( and add metod ni Operations class lo implement chesa

aa error ela pogottali maam :(
[/quote]

Posted

[quote name='cherlapalli_jailer' timestamp='1344040441' post='1302254730']
and try the test classes i sent
useing above 2 classes
[/quote]
nuvu ichina code baaga panikiochindhi maama :) but naaku code lo oka doubt undhi maama chepthava nuvvu ichina dhaanilo?

Posted

Why not go a head shoot the bullet

[quote name='hava' timestamp='1344040547' post='1302254737']
nuvu ichina code baaga panikiochindhi maama :) but naaku code lo oka doubt undhi maama chepthava nuvvu ichina dhaanilo?
[/quote]

Posted

[color=#282828][font=helvetica, arial, sans-serif][size=6]Operations o =[/size][/font][/color]
[b][color=#7F0055]new[/color][/b][color=#282828][font=helvetica, arial, sans-serif][size=6] [/size][/font][/color][color=#282828][font=helvetica, arial, sans-serif][size=6] Oparations() ; ee line ni explain chy mama *<:([/size][/font][/color]

Posted

[quote name='hava' timestamp='1344040282' post='1302254718']

mama nenu operations class lo methods implement chesa mama add and subtract rendu chesa.... but oka error osthundi mama..."The type Operations must implement the inherited abstract method Calc.add(int, int)"

P.S nenu Subtraction method ni abstract Calc class lo implement chesa and I declared it as a Non Abstract method :(

aa error ela pogottali maam :(
[/quote] type caste cheyali mama create an obj of operation class

Posted

[quote name='hava' timestamp='1344040612' post='1302254740']
[color=#282828][font=helvetica, arial, sans-serif][size=6]Operations o =[/size][/font][/color]
[b][color=#7F0055]new[/color][/b][color=#282828][font=helvetica, arial, sans-serif][size=6] [/size][/font][/color][color=#282828][font=helvetica, arial, sans-serif][size=6] Oparations() ; ee line ni explain chy mama *<:([/size][/font][/color]
[/quote]

operations class obj create chesadu .

2 methods loo obj create cheyachu

1. with new key word

2. with Class.forName(classname)

Posted

aasan bhasha mein..
Operations ante oka class which defines what it is..ante for example ee afdb undhi kada daniki profile name, number of posts, no of warnings etc etc define chesi unnayi...

Now 'o' is an object..nuvu rasina line meaning: instantiating an object antaru...so nuvu 'o' anne object define chesav..
now I can use that object 'o' to define a new member like o.profilename='Hava', o.posts=0...ala annamata..if you want to add more properties pina class definition marusthav anthey...
[quote name='hava' timestamp='1344040612' post='1302254740']
[color=#282828][font=helvetica, arial, sans-serif][size=6]Operations o =[/size][/font][/color]
[b][color=#7F0055]new[/color][/b][color=#282828][font=helvetica, arial, sans-serif][size=6] Oparations() ; ee line ni explain chy mama *<:([/size][/font][/color]
[/quote]

Posted

[quote name='Aamayakudu' timestamp='1344040852' post='1302254748']
type caste cheyali mama create an obj of operation class
[/quote]
mama okete primitive data type use chesthunnam kadha int ani... y need of type casting mama

int x = 5;

double y = 300.76736736378d;

int result z = x*y;

ila unnappudu kadh type casting use chestham? :(

×
×
  • Create New...