Obtain The Leading Methods - Programming and Problem Solving Assignment Help! Never Settle For Less In Your Academic!

Home   Course  
Previous << || >> Next

HELPING STUDENTS TO WRITE QUALITY METHODS - PROGRAMMING AND PROBLEM SOLVING ASSIGNMENT AT LOW COST!

CSE 1321L Programming and Problem Solving Lab - Kennesaw State University

Exercise 1: Design and implement a program (name it MinMaxAvg) that defines three methods as follows:

Method max (int x, int y, int z) returns the maximum value of three integer values.

Method min (int X, int y, int z) returns the minimum value of three integer values.

Method average (int x, int y, int z) returns the average of three integer values.

Solution:
using System;
class Program1
{
    static void Main()
    {
        int x, y, z;
        Program1 prg1 = new Program1();
        Console.Write("\n\n");
        Console.Write("Enter x value: ");
        x = Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter y value: ");
        y= Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter z value: ");
        z = Convert.ToInt32(Console.ReadLine());
        Console.Write("You Entered: ");
        Console.WriteLine("{0}, {1}, {2}",x,y,z);
        Console.WriteLine("Max Value: {0}",prg1.max(x,y,z));
        Console.WriteLine("Min Value: {0}",prg1.min(x,y,z));
        Console.WriteLine("Average Value: {0}",prg1.average(x,y,z));
    }
    public int max(int x, int y, int z)
    {
        if (x>y)
        {
            if (x>z)
            {
                return x ;
            }
            else  
            {
                return z ;
            }
        }
        else
        {
            if(y>z)
            {
                return y;
            }
            else
            {
                return z;
            }
        }
    }
    public int min(int x, int y, int z)
    {
        if (x<y)
        {
            if(x<z)
                {
                    return x;
                }
            else
               {
                   return z;
               }
        }
        else
        {
            if(y<z)
                {
                    return y;
                }
            else
                {
                    return z;
                }
        }
    }
    public int average(int x, int y, int z)
    {
        int sum=x+y+z;
        return (sum/3);
    }
}

GET READYMADE METHODS - PROGRAMMING AND PROBLEM SOLVING ASSIGNMENT SOLUTIONS - 100% PLAGIARISM FREE WORK DOCUMENT AT NOMINAL CHARGES!

Exercise 2: Design and implement a program (name it ComputeAreas) that defines four methods as follows:

Method squareArea (double side) returns the area of a square.

Method rectangleArea (double width, double length) returns the area of a rectangle.

Method circleArea (double radius) returns the area of a circle.

Method triangleArea (double base, double height) returns the area of a triangle.

Solution:

using System;
class Program2
{
    static void Main()
    {
        double side,radius,length,width,tBase,height;
        Program2 prg2 = new Program2();
        Console.Write("\n\n");
        Console.Write("Enter side value: ");
        side = Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter width value: ");
        width= Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter length value: ");
        length = Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter radius value: ");
        radius = Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter base value: ");
        tBase = Convert.ToInt32(Console.ReadLine());
        Console.Write("Enter height value: ");
        height = Convert.ToInt32(Console.ReadLine());
        Console.Write("\n Square Side: {0} ",side);
        Console.WriteLine("\n Square Area: {0}",prg2.squareArea(side));
        Console.Write("\n Rectangle Width: {0} ",width);
        Console.Write("\n Rectangle Height: {0} ",height);
        Console.WriteLine("\n Rectangle Area: {0}",prg2.rectangleArea(width,height));
        Console.Write("\n Circle Radius: {0} ",radius);
        Console.WriteLine("\n Circle Area: {0}",prg2.circleArea(radius));
        Console.Write("\n Triangle base: {0} ",tBase);
        Console.Write("\n Triangle Height: {0}",height);
        Console.WriteLine("\n triangle Area: {0}",prg2.TriangleArea(tBase,height));
        
    }
    public double squareArea(double side)
    {
        return (side*side);
    }
    public double rectangleArea(double width,double length)
    {
        return(width*length);
    }
    public double circleArea(double radius)
    {
        return(3.14*radius*radius);
    }
    public double TriangleArea(double tBase,double height)
    {
        return(0.5*tBase*height);
    }
}

MOST RELIABLE AND TRUSTWORTHY METHODS - PROGRAMMING AND PROBLEM SOLVING ASSIGNMENT HELP & HOMEWORK WRITING SERVICES AT YOUR DOORSTEPS!

Exercise 3: Design and implement a program (name it PalindromeInteger), to check if an integer value is a palindrome or not, using 2 methods (reverse and isPalindrome) specified as follows:

Method reverse(int number) takes integer number and returns number in reverse order. The method mathematically reverses the number.

Method isPalindrome(int number) takes integer number and returns true if the number is palindrome; false otherwise.

Use method reverse() to implement method isPalindrome(). Notice that an integer value is palindrome if the value and its reverse are equal.

Solution:

using System;
class Program3
{
    static void Main()
    {
        int number;
        Program3 prg3 = new Program3();
        Console.Write("\n\n");
        Console.Write("\n Enter a number: ");
        number = Convert.ToInt32(Console.ReadLine());
        Console.Write("\n Entered values: {0} ",number);
        if(prg3.isPalidrome(number))
        {
            Console.Write("\n Judgement: Palindrome");
        }
        else
        {
            Console.Write("\n Judgement: Not Palindrome");
        }
    }
    public int reverse(int number)
    {
        int r,sum=0;
        while(number>0)      
        {      
           r=number%10;      
           sum=(sum*10)+r;      
           number=number/10;      
        }    
        return sum ;
    }
    public bool isPalidrome(int number)
    {
        int rev=reverse(number);
        if (rev==number)
        {
                return true;
        }
        else
        {
            return false;
        }
    }
    
}

SAVE DISTINCTION MARKS IN EACH METHODS - PROGRAMMING AND PROBLEM SOLVING ASSIGNMENT WHICH IS WRITTEN BY OUR PROFESSIONAL WRITER!

Below are the related courses in which ExpertsMinds precisely deal with:

  • CSE 3203 Overview of Mobile Systems Assignment Help
  • CSE 1322L Programming and Problem Solving II Laboratory Assignment Help
  • CSE 1312 Object Oriented C++ Programming for Engineers Assignment Help
  • CSE 3153 Database Systems Assignment Help
  • CSE 1321L Programming and Problem Solving I Laboratory Assignment Help
  • CSE 2300 Discrete Structures for Computing Assignment Help
  • CSE 1322 Programming and Problem Solving II Assignment Help
  • CSE 3801 Professional Practices and Ethics Assignment Help
  • CSE 4983 CSE Computing Internship Assignment Help
  • CSE 1321 Programming and Problem Solving I Assignment Help
Tag This :- Methods - Programming and Problem Solving Assignment Help, TG48AKU1012C/C

get assignment Quote

Assignment Samples

    Advertising Campaign Assignment Help

    advertising campaign assignment help - As with any advertising campaign, there are pros and cons to attaching a celebrity or athlete to a company or product.

    Food & Beverage Assignment Help

    are you looking for best writer for food & beverage assignment help? expertsminds help you to score high marks in food & beverage assignments

Get Academic Excellence with Best Skilled Tutor! Order Assignment Now! Submit Assignment