Create a class called evaluatevalue

Assignment Help Basic Computer Science
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();

}
}
}

Reference no: EM13836665

Questions Cloud

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

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Htmlsupports tags create form analyze information true false

HTML supports tags that allow you to create forms and analyze the information submitted on forms. True False

  Scope and lifetime are distinct

Scope and lifetime are distinct yet related issues in programming languages. Languages can sometimes make design decisions that cause a conflict between the scope and the lifetime of variables. Java's decision to allow classes to be defined inside..

  How might the internet impact business

How might the Internet and associated World Wide Web impact business in the United States and thereby ultimately impact the U.S. economy

  Java / xml example that utilizes some form of recursion

Java / XML example that utilizes some form of recursion. Include blocks of code and the XML with your example

  Find the second largest element of a set of n elements drawn

Find the second largest element of a set of n elements drawn from an arbitrary totally ordered set in as small a number of comparisons as possible. Only binary comparisons are allowed.

  Give the first 16 binary numbers starting at 0

Give the first 16 binary numbers starting at 0 - How many values can be expressed using 3 binary did get? List them in binary and in base 10.

  Write two distinct fuction prototypes for a function

Write two DISTINCT fuction prototypes for a function that accepts three values and return three values calculated within a function to the calling function.

  The sum of the first even integers true or false

The sum of the first 17 even integers is 306. True or False Answer

  Find the gradient magnitude and gradient direction

Consider the sub-image shown above. Find the gradient magnitude and gradient direction at the center entry using the following operators.

  What is the decimal value

assume that the following 10 bit numbers represents sighned integers using sign/magnitude notation. the sign is the leftmost bit and the remaining 9 bits represent the magnitude. What is the decimal value for 100000000.

  Show the musical instrument inventory

2. Stefan lano needs displays that will show the musical instrument inventory in his chain of music stores that caters to musicians playing in world-class symphomy orchestras in basel, Switzerland; Buenos aires, argentina; and Philadelphia and..

  An organization can prepare for and avoid the challenge

Identifying three primary challenges when deploying Active Directory and using it in an organization. Discuss specific ways an organization can prepare for and avoid the challenges.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd