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

  The big picturethis assignment consists of two separate

the big picturethis assignment consists of two separate programming tasks.1. you will create a linked list module that

  Uses classes with linked list

Turning a work in C++ that uses classes with a linked list to a no classes project

  Clears the screen

Assignment: Write a script that meets the following requirements:•Clears the screen•Creates the menu displayed below with any additional formatting you may desire•Prompts the user to choose a menu option•Assigns the value chosen by the user to the va..

  Write a program that reads numbers

Write a C++ program that reads N positive numbers from the keyboard, calculates and shows the smallest number of all numbers

  Function that will accept the three sides of a triangle

Create a function that will accept the three sides of a triangle (a, b, c) as scalar values, calculate the angles that correspond to these sides (alpha, beta, gamma), and return these angles to the function call in the script file.

  How many integer values are in the array

Write a function named "location_of_largest" that takes as its arguments the following.

  Write program to perform add-drop-list and update functions

Write C++ program to do add, drop, list (in last name / first name sorted order or id) and update functions. separate UI from data processing use object programming method multiple files

  Roman numeral equivalents of the decimal numbers

Write a program that prints a table of all the Roman numeral equivalents of the decimal numbers in the range 1 - 100.

  Write c program for linked list applications

Write a complete C program which illustrates the Linked list applications data structures and algorithms. The program will read in mid-semester test scores as Main Linked List and produce six outputs:

  Write a recursive definition in sml to reverse

Write a recursive definition in SML to reverse a list of elements and multiply all elements with 2.

  State a c program that opens the file

Write a C program that opens the file and firstly stores all the values in an appropriately declared two-dimensional array of integers. It then should analyse this array to find (from the 40 input values) the total number of coursework marks in the..

  Write a bouncing ball video game

The balls bounces within the screen where the two horizontal walls are fixed

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