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

  Accepts filename to sort and run

Accepts filename to sort and run size as command line arguments. Calls the sort routine. Writes the sorted result to a file named sorted.txt.

  Convert fahrenheit to celsius

a program that will convert Fahrenheit to Celsius. The user will enter the degrees in Fahrenheit and the program will give the results in Celsius. This is to be done in Pseudo Code Only. good programming techniques. Must also use modular programmi..

  Derive expression for the effective mips rate

Derive an expression for the effective MIPS rate when using this system for the execution of this program in terms of x, n and α.

  Explain network security plan and make modifications

Please review your previous work including that of last week with your Network Security Plan and make revisions and modifications as necessary based on our discussions and research up to this point. This is a plan that would be submitted to your c..

  Design and create a website with html

Your task is to create a website on anything that is of interest to you. The website will need to have minimum of 3 web pages. This means that you have an index page that will link to other pages and vice versa.

  How write program contains array double values

How do you write a program that contains an array of 15 double values

  Write a class encapsulating a course

write a class encapsulating a course. Where a course is assumed to have three attributes: a code name, a description and number of credits.

  Prevent the computer intrusion described in case

1. What should the Connecticut Company have done to prevent the computer intrusion described in this case? What should it have done to detect this computer intrusion?

  Develop a website which can store country-wise data

Use the data in the XML documents provided to perform the tasks below:

  Importance of creating an order of volatility

Develop a detailed plan to approach and secure the incident scene based on the information you have from the scenario - Discuss the initial steps you would take for the investigation

  Storage of an unordered collection of items

Storage of an unordered collection of items that facilitates efficient, random access of items based on an item's position in the collection.

  Google maps or similar available web services

Using Yahoo! Maps, Google Maps or similar available Web services, create an rssGEO2.0.xml document that will group and display at least five different geographical locations. The theme of the locations is up to you, but include your favorite vacation..

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