Jump to content

Urgent Solutions Helpp ..


Recommended Posts

Posted

" ee solutions kasta chepandi bhaya .. repu assignment submit cheyali ... chala unay .. em cheyalo ardam kavatledu .. anni cheyakapoina .. chesinavi perfect ga cheste saripodi .. ma odu hurt avtadu .. !q#

1.Give a regular expression that detects hexadecimal numbers in a text, for example ‘0x0f4’, ‘0acdadecf822eeff32aca5830e438cb54aa722e3’, ‘8BADF00D’ should be detected. Bonus points for writing a test case.

2.Write two classes, one to represent a rectangle, the second a square. They must have an appropriate constructor (width, height for the rectangle, width for the square) and area and perimeter calculation methods. Code duplication must be avoided as much as possible. Please explain your implementation choices.

3.Write two functions, raiseException() and catchException(). raiseException() is a function that raises an exception. catchException() calls raiseException() and handles the exception by displaying an informative message.

4.Write a text sanitization function that cleans up a string for output. It should take a “context_type” parameter in addition to the text to sanitize. “context_type” indicates the context in which its output will be used (HTML text, HTML attribute or javascript string).

5.Write a function that given an XML document (as a string) returns the number of attributes for each occurrence of the most common tag type. For instance, if the “a” tag is the most common in the provided document, it should count the total number of attributes of all “a” tags in the document.

6.Here is the pseudo code of a function that is defined recursively:
f(0) = 1;
f(1) = 3;
f(n) = 3 * f(n - 1) - f(n - 2);
Provide an implementation for ‘f’. Bonus points for a non recursive implementation.

Posted

[quote name='CASANOVA' timestamp='1348580469' post='1302536249']
memu samanya prajalam devudiki cheppalemu kada...
[/quote] @3$%

Posted

[quote name='CASANOVA' timestamp='1348580469' post='1302536249']
memu samanya prajalam devudiki cheppalemu kada...
[/quote]
[quote name='Lily' timestamp='1348579194' post='1302536145']
assignmnet a ?
[/quote]

yep :(

Posted

[quote name='CASANOVA' timestamp='1348580469' post='1302536249']
memu samanya prajalam devudiki cheppalemu kada...
[/quote]

nu ala anaku bhaya .. manushulo kuda devulu untaru .. assgn ki help cheste neku nelo devudu kanipistadu

Posted

6.
namespace ConsoleApplication4
{
class series
{
public static void main(String[] args)
{

public int series(int n)
{

int a, b=3, c = 1;

for (int i = 0; i <= n; i++)
{
a = b;
b = 3 * b - c;
c = a;
}
return c;
}


I dint compile..if you dont get any errors that means this code is correct. This is non recursive

recursive:
function(int n)
{
//put conditions when n=0 and n =1
return 3 * funtion(n - 1) - funtion(n - 2)
}

Posted

[quote name='ChampakDas' timestamp='1348598660' post='1302538100']
6.
namespace ConsoleApplication4
{
class series
{
public static void main(String[] args)
{

public int series(int n)
{

int a, b=3, c = 1;

for (int i = 0; i <= n; i++)
{
a = b;
b = 3 * b - c;
c = a;
}
return c;
}


I dint compile..if you dont get any errors that means this code is correct. This is non recursive

recursive:
function(int n)
{
//put conditions when n=0 and n =1
return 3 * funtion(n - 1) - funtion(n - 2)
}
[/quote]

[img]https://lh4.googleusercontent.com/-vYyEIvRBrhg/TbPnsM-sP8I/AAAAAAAABgs/z01Y2kmFumQ/s320/alludaa-o.gif[/img][img]http://i872.photobucket.com/albums/ab288/sajja01/cry-o.gif[/img]

Posted

3. 3.Write two functions, raiseException() and catchException(). raiseException() is a function that raises an exception. catchException() calls raiseException() and handles the exception by displaying an informative message.

try block lo rasieException() method call chesi..called method lo raise whatever the exception like number/0 exception, overflow etc
and catchException() - put this catch..in the called method call the raiseException().

Posted

2.Write two classes, one to represent a rectangle, the second a square. They must have an appropriate constructor (width, height for the rectangle, width for the square) and area and perimeter calculation methods. Code duplication must be avoided as much as possible. Please explain your implementation choices.
edhi using abstract class

using System;
namespace Calculations
{
abstract class Shape
{
abstract public void init();
abstract public double area(double l, double h);
}

class Rect : Shape
{
public override void init()
{
initilaize them here
}
public override double area(your parameters)
{
return calcualte here;
}
}

class Square: Shape
{
public override void init()
{
initilaize them here
}
public override double area(your parameters)
{
return calculate here;
}
}


public class Calculations
{
public static void Main()
{
Shape r = new Rect();
r.init();
r = new Square();
r.SomeMethod();

}
}
}

Posted

[img]http://i872.photobucket.com/albums/ab288/sajja01/cry-o.gif[/img] yo pikki
[quote name='pikki' timestamp='1348598803' post='1302538125']
[img]https://lh4.googleusercontent.com/-vYyEIvRBrhg/TbPnsM-sP8I/AAAAAAAABgs/z01Y2kmFumQ/s320/alludaa-o.gif[/img][img]http://i872.photobucket.com/albums/ab288/sajja01/cry-o.gif[/img]
[/quote]

×
×
  • Create New...