ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 3 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 09 May 2017 My Price 11.00

Call 'Main' from the 'AreaConverter

I need some help with a C# Console Program. Please do not change my existing code, with exception of any additions or changes required to help me with my specific problem. I have two classes. I am having issues calling one class from another. You will see some code in 'main' class commented out that I have been trying (Lines 50 - 64). I need to understand how to do the following:

1) Call 'Main' from the 'AreaConverter' class and use the value of "area" in the AreaConverter class to complete the additional calculations.

2) Call 'AreaConverter' class from the 'Main' class to print out the results of the additional calculations performed in 'AreaConverter' class.

Thanks

 

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace Exceptions{class AreaConverter{double area = 0.0;double sqftin = 0.00694444;double sqcentin = 6.4516;double sqmeterin = 0.00064516;double sqft = 0.0;double sqcent = 0.0;double sqmeter = 0.0;// Method to Convert the Area into Square Feet, Square Centimeters,Square Meterspublic static void totConvert(double area, double sqftin, doublesqcentin, double sqmeterin, out double sqft, out double sqcent, out doublesqmeter){// Convert Area Square Inches to Square Feetsqft = area * sqftin;// Convert Area Square Inches to Square Centimeterssqcent = area * sqcentin;// Convert Area Square Inches to Square Meterssqmeter = area * sqmeterin;}}}

using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using Exceptions;namespace Exceptions{class Exceptions{static void Main(){// Variables Initializedvar length = 0.0;// Length Inputvar width = 0.0;// Width Inputvar area = 0.0;// Area Outputvar perimeter = 0.0;// Perimeter Outputdouble sqft = 0.0;double sqcent = 0.0;double sqmeter = 0.0;// Welcome MessageConsole.WriteLine("\n\t\tWELCOME TO AREA & PERIMETER CONVERSIONCALCULATOR!");Console.WriteLine("\n\t****************************************************************");// Prompt for Length of RectangleConsole.Write("\n\tPlease Enter the Length of the Rectangle: ");// Call Method to capture the Length of Rectanglelength = recLength();// Prompt for Width of RectangleConsole.Write("\n\tPlease Enter the Width of the Rectangle: ");// Call Method to capture the Width of Rectanglewidth = recWidth();// Call Method to Calculate the Area anad Perimeter of RectangletotAreaPerim(length, width, out area, out perimeter);// Display the Required ResultsConsole.WriteLine("\n\tAREA & PERIMETER VALUES");Console.WriteLine("\n\t****************************************************************");Console.WriteLine("\n\tThe Area of the Rectangle is: \t\t\t{0}sq.in.", area);Console.WriteLine("\n\tThe Perimeter of the Rectangle is: \t\t{0}sq.in.", perimeter);Console.WriteLine("\n\t****************************************************************");//==================WORKING CODE==========================//Call the Area Converter class//Exceptions.AreaConverter Except = new AreaConverter();//Except.totConvert(sqft, sqcent, sqmeter).ToString();Console.WriteLine("\n\tAREA CONVERSION (SQUARE FEET, SQUARE

Answers

(11)
Status NEW Posted 09 May 2017 01:05 AM My Price 11.00

-----------

Attachments

file 1494292765-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)