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

  Identifies the cost of computer

identifies the cost of computer components to configure a computer system (including all peripheral devices where needed) for use in one of the following four situations:

  Input devices

Compare how the gestures data is generated and represented for interpretation in each of the following input devices. In your comparison, consider the data formats (radio waves, electrical signal, sound, etc.), device drivers, operating systems suppo..

  Cores on computer systems

Assignment : Cores on Computer Systems:  Differentiate between multiprocessor systems and many-core systems in terms of power efficiency, cost benefit analysis, instructions processing efficiency, and packaging form factors.

  Prepare an annual budget in an excel spreadsheet

Prepare working solutions in Excel that will manage the annual budget

  Write a research paper in relation to a software design

Research paper in relation to a Software Design related topic

  Describe the forest, domain, ou, and trust configuration

Describe the forest, domain, OU, and trust configuration for Bluesky. Include a chart or diagram of the current configuration. Currently Bluesky has a single domain and default OU structure.

  Construct a truth table for the boolean expression

Construct a truth table for the Boolean expressions ABC + A'B'C' ABC + AB'C' + A'B'C' A(BC' + B'C)

  Evaluate the cost of materials

Evaluate the cost of materials

  The marie simulator

Depending on how comfortable you are with using the MARIE simulator after reading

  What is the main advantage of using master pages

What is the main advantage of using master pages. Explain the purpose and advantage of using styles.

  Describe the three fundamental models of distributed systems

Explain the two approaches to packet delivery by the network layer in Distributed Systems. Describe the three fundamental models of Distributed Systems

  Distinguish between caching and buffering

Distinguish between caching and buffering The failure model defines the ways in which failure may occur in order to provide an understanding of the effects of failure. Give one type of failure with a brief description of the failure

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