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

  Describe what is downward solution

The Conflict Resolution Phase can be thought of as control strategy, describe four types of such strategy Describe what is downward solution

  Economists find the prisoner''s dilemma

Economists find the Prisoner's Dilemma game interesting because in it, players who act in their own self-interest, don't end up better off--they end up worse off instead. Explain why it is both a good thing and bad thing that when a person acts in th..

  Thread problem

Implement what is kind of the inverse of our Producer - Consumer, where many Producers supply a limited capacity consumer.

  Principle and theory of security management

What do you think are some major danger signals concerning possible employee theft, and why? Are these signals the same in retail vs. industrial settings?

  From the e-activity

From the e-Activity, devise a scenario where a user in a business environment is unable to print a document to a printer connected to a Windows Server 2012 print server. Determine at least two (2) troubleshooting steps an IT support technician should..

  Resolve this problem within wireless technology

You can resolve this issue by wiring but you do not want to do that. What can you do to resolve this problem within wireless technology?

  Use active directory for authentication and authorization

Why would an organization choose to use Active Directory for authentication and authorization over other solutions such as Novell Netware or a free solution such as Linux based LDAP.

  Which of the following statements are true

Which of the following statements are true? Select one or more

  Suppose a c++ compiler for the mips

Suppose a C++ compiler for the MIPS machine associates $s5 with array a and $s6 with variable i. How does it translate a[i] = a[i+1]; into MIPS assembly language?

  Networks are fundamental

Networks  are  fundamental  to  every  aspect  of  our  society.  Designing  a  network  that  is  both  adequate  to  current  and  future  needs  is  important.

  What is the probability that the m th record is the first

A hash function randomly distribute records one by one in a space that can hold x number of records what is the probability that the m th record is the first record to result in collision?

  Relationship between step and impulse

What is the relationship between step and impulse responses for RC and RL circuits? Use simple circuits with R = 1 Ohm, L = 1 H and C = 1 F

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