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

  Write program that takes number show number in power of 3

Write a program that takes a number between -121 and 121 and output that number in the format of power of 3 (1,3,9,27)

  Dynamic character arrays

Dynamic character arrays str and add contain strings. Write a function append that uses str and add as arguments and appends add to the end of str. Write a main program that illustrates the use of function append to concatenate five strings.

  Using virtual methods, organize the animals

Using virtual methods, organize the animals in a small zoo, having as guests lions, parrots, alligators, penguins, elephants, cobras, zebras, hawks, turkeys and rabbits.

  Create an array of boat objects

Create Classes for each of the object types that need to be stored, as indicated above.

  Write a program to make the ssds function

Write a program to make the SSDs function as a MM:SS real-time clock. Hint: You must not use a single delay routine for the one second delay because that will not allow for persistence of vision. The displays need to be constantly refreshed during ev..

  The staffs need a program that can determine

The staffs need a program that can determine whether children have been naughty or nice. individual data files(can be any name) for each childred are available that consist of 368(365+3)integer number each.

  Write a program that will read in 5 numbers

Write a program that will read in 5 numbers and add 10 to the first number, 20 to the second number, and 30 to the third number, 40 to the fourth and 50 to the 50th.

  Contains a design with a while loop

This problem contains a design with a while loop. Assume that sum references a doubleword in the data segment and that count is in the ECX register. Give a fragment of 80x86 assembly code that implements the design.

  Loops and if conditions

Write a program that requests a password

  We have to deal with student pilots

We have to deal with student pilots and airplanes. Students have a unique student id, a name, and a year that students are in. Airplanes have a unique airplane id, model, a cruising range

  Prompts the user to enter time in 12-hour notation

Write a program that prompts the user to enter time in 12-hour notation. The program then outputs the time in 24-hour notation. Your program must  contain  three  exception  classes

  Write a c++ program which performs hexadecimal operands

Write a c++ program which performs +, -, *, / and $ on hexadecimal operands. The maximum length of any operand or a solution is 40 digits. The input will be in the following format

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