Instantiate three objects from the class

Assignment Help Basic Computer Science
Reference no: EM13984664

Problem 1.

Create a console app-

Given the array

int[] anArray = {1,2,3,4,5,6,7,8,9}
Create a multicast delegate. This delegate will be used to call the following methods

Public static void EvenNumbers (int[] someNumbers)

Public static void OddNumbers (int[] someNumbers)

Public static void SumNumbers (int[] someNumbers)

EvenNumbers extracts the even numbers from the list and displays them, with the appropriate text

OddNumbers extracts the odd numbers from the list and displays them, with the appropriate text

SumNumbers adds together all numbers from the list and displays their total, with the appropriate text

Attach all three methods to the delegate so that all three methods are called when making the single delegate call. Call the

delegate. Now remove the SumNumbers method and call the delegate again.

Problem 2.

Create a console app named MyClasses. Create a class named SemesterClasses. Create a constructor that accepts three parameters;

semesterName=string;

courseTitle=string;

courseCredits=int;

additional parameters, not contained in the constructor, should be declared and initialized as follows;

double finalGrade=0.0;

bool graduateSemester = false;

Create get/set accessors for each of these parameters with private variables accessed through public accessors. Next, override the ToString method in the class to return all parameters with the appropriate text.

Now instantiate three objects from the class, by calling the constructor and use the following data;

#1 semesterName= Spring2015

#1 courseTitle= Programming 1

#1 courseCredits=3

#2 semesterName= Fall2015

#2 courseTitle= Programming 2

#3 courseCredits=4

#1 semesterName= Spring2016

#1 courseTitle= Excel

#1 courseCredits=3

After creating the objects, use the object's ToString to display each objects information. Now set a value for the finalGrade in each object, and set graduateSemester in the third object to true. Again using the objects Tostring to display each objects information

Reference no: EM13984664

Questions Cloud

Problem regarding the international competitiveness : What impact does the dollar appreciation have on the firm's international competitiveness? What about a dollar depreciation?
Reasons public health needs to collaborate with business : Describe the three principle changes in the public health landscape driving public health's need to partner with business - what are the reasons public health needs to collaborate with the business sector?
Advantages of using a credit card : What are three advantages of using a credit card? Can you think of any disadvantages?
You are given the following information about the costs : You are given the following information about the costs of a perfectly competitive firm.
Instantiate three objects from the class : After creating the objects, use the object's ToString to display each objects information. Now set a value for the finalGrade in each object, and set graduateSemester in the third object to true. Again using the objects Tostring to display each ob..
Future value of multiple cash flows : What is the key economic principle involved in calculating the present value and future value of multiple cash flows?
Discuss the dietary changes : Discuss the dietary changes needed to slow development or prevent cancer or heart disease. Find one reputable website related to the disease you picked and describe the dietary recommendations
What is jung premium expense : In 2010, Jung sold 500,000 boxes of cereal and distributed 25,000 dolls. What is Jung's premium expense for 2010?
What is the weight of the iron placed on the block : A piece of iron (density 6000 kg/m3) is placed on top of the block so that 85% of the block is now immersed in the water. What is the weight of the iron placed on the block?

Reviews

Write a Review

 

Basic Computer Science Questions & Answers

  Mobile technologies in a user-friendly manner

The items need to be easily searchable and of sufficiently high resolution for details to be viewed. They need to be accessible through mobile technologies in a user-friendly manner. The University also wants a way to protect the copyright of the ..

  Research a writing guide for forensics organization

Your manager has asked you to research and recommend a writing guide that examiners in your computer forensics organization will use for all official written reports.

  Define a specialized representation language

Define a specialized representation language to describe the activities of a public library. This language will be a set of concepts and relations using conceptual graphs. Do the same thing for a retail business.

  Remember from lecture that using

Remember from lecture that using { and } creates a block of code within the condition instead of just one line.Also, not the use of single quotes instead of double quotes. (Double quotes signify a literal string while single quotes signify a literal ..

  Dimensions of system dependability

"Dimensions of System Dependability" Please respond to the following: Consider the four principal dimensions of dependability. Choose two dimensions, describe them, and explain the relationship between your chosen dimensions. Provide at least two ..

  Virtual integrative network design project.

Identify hardware and software needed to secure your choice of networks against all electronic threats.

  Consider a system needed to store information

Consider a system needed to store information about computers in a computer lab at a university, such as the features and location of each computer. Ascertain the domain classes that might be included within the domain model. Discuss whether or not y..

  Draw the circuit for a 2-input xnor gate

Draw the circuit for a 2-input XNOR gate using at most two tri-state elements (tri-state buffer or tri-state inverter) and one inverter.

  A self-introduction among the slides

Using Power Point, create 10 empty slides ready for editing with the following specification: 1- a self-introduction among the slides. 2- Master feature incorporate all of the 10 slides.

  Analyze data for an event planning company

In this project, you will analyze data for an event planning company. Skills needed to complete this project:  Converting Data into Tables and Adding Total Rows to Tables

  Use string manipulations to figure out the units

Prompt the user two STRING inputs of time instances in the format of: YYYY/MM/DD HH:NN:SS. Use string manipulations to figure out the units (year, minute, etc.). The output is the total elapsed time in seconds between the two time inputs.

  Explaining security risks for computing infrastructure

In your new position at XYZ Corporation, you have been asked to lead risk assessment team. As part of project to assess security risks for computing infrastructure.

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