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

  Determine pz and also estimate any constants

Determine P(z) and also estimate any constants in this expression so that P(z) is given in terms only of  and μ. If possible eliminate any common factors in numerator and denominator of this expression

  Transferring of videos and music files between computers

Transferring of videos and music files between computers

  How wikimedia foundation meet criteria for knowledge create

How does the Wikimedia Foundation meet the criteria for a knowledge-creating organization

  Design patterns in today-s development environments

In System Analysis and Design: Design Patterns - How widely used are design patterns in today's development environments?

  Discuss five of top current it issues in higher education

Discuss Five of the top current IT issues in Higher Education

  Decryption algorithm: reverse the encryption algorithm

Decryption algorithm: Reverse the encryption algorithm. The permutation, however, should (circular) shift the bit pattern by 1 bit to the right

  Calculate and display the volume of a cylinder

Write a complete program for Visual C++ to calculate and display the volume of a cylinder, given its radius and height. Your program must meet the following requirements.

  Explain whetherucita should or should not be adopted

What are your arguments in support of these points? You really did not answer the question as these don't really explain whether you believe the UCITA should or should not be adopted.

  N-processor common crcw pram algorithm

Input is an array of n elements. give an O(1) time, n-processor common CRCW PRAM algorithm to check whether the array is in sorted order.

  Which following statements correctly sets a dog weigh

Assume you have created a class named Dog that contains a data fi eld named weight and an instance method named setWeight(). Further assume the setWeight() method is public and accepts a numeric parameter named pounds

  Develop a first-cut sequence diagram

Develop a first-cut sequence diagram, which only includes the actor and problem domain classes. Add the view layer classes and the data access classes to your diagram from part a. Develop a design class diagram based on the domain class diagram and..

  How to solve performance problem of computer

Your friend recommends upgrading RAM to 256 MB to correct performance problems. Is there any other way to solve performance problem? Justify your answer.

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