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

  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