Which is not a valid name for a method or function

Assignment Help C/C++ Programming
Reference no: EM13809676

Question 1. Which of the following is a valid overloaded version of this method?
char CalculateGrade(double val1, double val2)
(Points : 5)
char CalculateGrade(int val1)
char CalculateMyGrade(int val1, double val2)
char CalculateMyGrade(double val1)
double CalculateGrade(double val1, double val2)

Question 2. Which is probably a call to an accessor method?
SetNoOfYards(double yds);
double yds = GetNoOfYards();
CarpetCalculator plush = new CarpetCalculator();
double yards = yds.calcYards();

Question 3. Which is not a valid name for a method or function?
mod1
mod 1
MyMod1
mod_1

Question 4. In Design mode, set the words that will appear in a textbox by modifying its _____ property in the Properties window.
label
font
name
text

Question 5. When the user of your fast-food ordering GUI selects the "checkBoxBurger" CheckBox, the string "Burger" should appear in the "listBoxOrder" ListBox. To implement this functionality, write _____ in the ckBoxBurger_CheckedChanged() event handler.
if
(ckBoxBurger.isChecked)
{
listBoxOrder.Items.Add("Burger");
}

if (ckBoxBurger.Checked)
{
listBoxOrder.Add("Burger");
}

if (ckBoxBurger.isChecked())
{
listBoxOrder.Text = "Burger";
}

if (ckBoxBurger.Checked)
{
listBoxOrder.Items.Add("Burger");
}

Question 6. The first time a programmer double clicks on a button object in design mode, the button's default event handler method _____ is added to the code.
Click()
Clicked()
Double_Click()
Double_Clicked()

Question 7. To pass the first and second elements of the myData array to the DisplayItems method, replace the commented line below with _____.
static void
Main()
{
int[] myData = {1,2,3,4};
//call DisplayItems
}
public static void DisplayItems(params
int[] item)
{
for (inti=0; i<item.Length; i++)
Console.Write("{0} ",item[i]);
}

DisplayItems(myData, 1, 2);
DisplayItems(myData[0],myData[1]);
DisplayItems(myData, 0, 1);
DisplayItems(myData[1],myData[2]);

Question 8. The size of an _____ can be determined when the program is written or at run time, whereas the size of an _____ must be determined when the program is written.
arraylist, array
array, arraylist
array, array class
array class, array

Question 9. Given the following declaration, what is/are the value(s) of age[1,0]?

int[,] age = { {2, 3, 6, 7},
{5, 8, 9, 4} };

2
5
5 2
2 5

Question 10. Before your C# program attempts to append data to a file, it should first _____.
callFile.Append to ensure the file can be written to.
callFile.Create() to create the file.
callFile.Exists() to make sure the file exists.
callFile.Write() to make sure the file can be written to.

Question 11.The following C# statement will _____.

Console.WriteLine(Directory.Exists(Directory.GetCurrentDirectory()));

print out "true"
print out "true" if there are files in the current directory
print out "true" if the current directory has subdirectories
throw an exception

Question 12. To print out the time and date a file called "plans.txt" was last written to, write _____.
Console.WriteLine(File.GetAccessInfo("plans.txt");
Console.WriteLine(GetAccessTime("plans.txt");
Console.WriteLine(File.GetLastWriteTime("plans.txt"));
Console.WriteLine(GetLastWriteTime ("plans.txt");

Reference no: EM13809676

Questions Cloud

Develop a new process design for the production : Using the Six Sigma DMAIC process, develop a new process design for the production of the Riordan electric fans. Be sure to take advantage of any global opportunities available to Riordan, such as lower labor costs.
Declare and initialize an appropriate variable : Show the source code for a C# console application names ‘Sibs' that prints your frist name on the first line, your last name on the second line, and the number of siblings you have on the third line Declare and initialize an appropriate variable fo..
Write a paper about the movie the great debaters : Write a paper about the movie The Great Debaters.
What could bill do to improve performance evaluation process : What are the legal issues Martin and other supervisors need to consider in conducting performance appraisals? What could Bill do to improve the performance evaluation process in his store?
Which is not a valid name for a method or function : Which is not a valid name for a method or function? Which of the following is a valid overloaded version of this method
Discuss how ethnocentrism affects individuals and societies : Discuss how ethnocentrism affects individuals and societies.
Outlining the components of the program : Illustrate integrative learning in outlining the components of the program, their importance and why the program should be developed. Integrate research from the course text, other academically appropriate resources, and personal experiences.
Demographics and community resources : Demographics and Community Resources
Appropriate structure to use to program the statement : A home improvement store is giving a discount of 20% on all purchases of more than $250. Which of the following is the appropriate structure to use to program the statement

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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