Reference no: EM13836665
1. Create a class called evaluateValue that declares 3 integer class variables: zeroValue, positiveValue and negativeValue. These should be declared as public and you should not use automatic properties to declare them.
2. Your class should have a constructor that takes one integer argument. In the constructor you will code if statements to set one of the three class variables (indicators) to 1 if the number sent to the constructor is either equal to zero, negative, or positive.
3. In the class provide a method printit() used to print the results
Evaluate the positive, negative, and zero indicator
to determine which line to print. If the indicator
is set to 1 then the indicator is true.
You will print one of three statements;
The number was zero.
The number was positive.
The number was negative.
4. In the default wrapper class named assignment3 and containing Main write the code in Main that declares one integer variable: val1.
5. Use Console Write and Readline and the convert method to take the integer entry from the keyboard and pass it to the evaluateValue constructor.
6. Instantiate an evaluateValue object and pass the integer values to the constructor.
7. From Main call the printit method which will print the resulting evaluation in the class object.
The output might look like this:
Below is what I have been able to write
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
namespace Assignment3
{
class evaluateValue
{
//Create a class called evaluateValue that declares 3 integer class variables: zeroValue,
// positiveValue and negativeValue. These should be declared as public and you should not
//use automatic properties to declare them.
public int zeroValue;
public int positiveValue;
public int negativeValue;
public evaluateValue(int val1)
{
}
public void printit()
{
}
}
class assignment3
{
public static void Main(string[] args)
{
//declare the local val1 variable
int val1;
//prompt the user for input of one integer
Console.Write( " Enter an integer value: ");
val1 = Convert.ToInt32(Console.ReadLine() );
//instantiate a evaluateValue object here
// and pass val1 to the constructor
evaluateValue = new myValue(val1);
//call the object method printit here
myValue.printit();
}
}
}
What could be done to ensure politicization
: be done to ensure politicization
|
The number specified in the integer
: VB Scripting exercise: Exercise #3 - Fun With Strings #1 Create a function that takes in a string and an integer and returns a string that contains the original string repeated by the number specified in the integer.
|
Maroon box is a dvd rental company
: Maroon Box is a DVD rental company that rents DVD's through kiosks located in strategic locations. You have applied for a job as a database administrator with Maroon Box. To test your database skills Maroon Box has given you the following scenario
|
Description of why this section is important
: The subheading should include a) an example scenario of how this topic should be handled in your company b) a description of why this section is important to organizational communication
|
Create a class called evaluatevalue
: 1. Create a class called evaluateValue that declares 3 integer class variables: zeroValue, positiveValue and negativeValue. These should be declared as public and you should not use automatic properties to declare them.
|
Description of the economy and major influences
: Description of the economy and major influences in commercial world.
|
Article related to cloud-enabling technology
: Find 1 article related to Cloud-Enabling Technology and to turn in the following: (1) TheURL of the article, (2) A brief summary of the article, and (3) a brief statement of your thoughts on the article. These items should be no more than 1 page in l..
|
Problem regarding the polling exercise
: Conduct a poll of at least five people by asking the following questions. Evaluate each answer and decide whether you would consider it as hedonic or eudaimonic, and record it in the table. Finally, answer the question below the table in 200-350 w..
|
Describe a strategic management process
: Describe a strategic management process that can be utilized by a multinational organization to gain a competitive advantage over others in their industry and explain the importance of each stage
|