Starting out with Visual C# (4th Edition)
4th Edition
ISBN: 9780134382609
Author: Tony Gaddis
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 8, Problem 9MC
Program Description Answer
“Tokens” include the series of words or other items of data present in a string and are separated by spaces or other characters.
Hence, the correct answer is option “D”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
v2
Question 3
What is the size_t data type?
Group of answer choices
The size_t data type is a Time data type that can hold hours, minutes and seconds.
The size_t data type is an integer that can hold only non-negative numbers.
The size_t data type is an integer that can hold only integer numbers.
The size_t data type is a size that can hold only size.
The size_t data type is a string that can hold only string.
the program below is the program that is being referred to in the image,
using namespace std;
struct varis
{
string lastName, firstName;
int hours, rate;
double pay;
int major_type[2];
};
void print_Title();
string readName();
int readHours();
int readPayRate();
int readMajor();
double computeAmount(int myMajor, double myPay);
void printRecord(varis info[], int size);
int main()
{
print_Title();
int size = 10;
int x = 0;
varis info[size];
do
{
cout << "\nEnter first name, last name, numbers of hours worked, and hourly pay\n";
info[x].firstName = readName();
info[x].lastName = readName();
info[x].hours = readHours();
info[x].rate = readPayRate();
info[x].pay = info[x].hours * info[x].rate;
cout << "Type 1 if you are a Computer Science major or a 0 if you are not: ";
info[x].major_type[0] = readMajor();
cout << "Type 1 if you are a Cyber Security…
Create an application that accepts a sentence as input and converts each word to “Pig Latin.” In one version, to convert a word to Pig Latin you remove the first let- ter and place that letter at the end of the word. Then you append the string "ay" to the word. Here is an example: English: I SLEPT MOST OF THE NIGHT Pig Latin: IAY LEPTSAY OSTMAY FOAY HETAY IGHTNAY
Chapter 8 Solutions
Starting out with Visual C# (4th Edition)
Ch. 8.2 - Declare a char variable named letter and assign...Ch. 8.2 - Prob. 8.2CPCh. 8.2 - Prob. 8.3CPCh. 8.2 - Write a foreach loop that displays each character...Ch. 8.2 - Write the first line of an if statement that calls...Ch. 8.2 - Write the first line of an if statement that calls...Ch. 8.2 - Write a statement that calls the char.ToUpper...Ch. 8.2 - Prob. 8.8CPCh. 8.2 - Prob. 8.9CPCh. 8.2 - Prob. 8.10CP
Ch. 8.2 - Prob. 8.11CPCh. 8.2 - A program has two string variables named vegetable...Ch. 8.2 - Prob. 8.13CPCh. 8.2 - What delimiter is used to separate data in a...Ch. 8.3 - Prob. 8.15CPCh. 8.3 - Prob. 8.16CPCh. 8.3 - Prob. 8.17CPCh. 8.3 - Prob. 8.18CPCh. 8.3 - Prob. 8.19CPCh. 8.3 - Suppose an application contains a structure named...Ch. 8.3 - Prob. 8.21CPCh. 8.3 - Prob. 8.22CPCh. 8.4 - Look at the following declaration: enum Flower {...Ch. 8.4 - Prob. 8.24CPCh. 8.4 - Prob. 8.25CPCh. 8.5 - Prob. 8.26CPCh. 8.5 - Prob. 8.27CPCh. 8.5 - Prob. 8.28CPCh. 8.5 - Prob. 8.29CPCh. 8.5 - Prob. 8.30CPCh. 8 - In C#, __________ are enclosed in single quotation...Ch. 8 - Prob. 2MCCh. 8 - Prob. 3MCCh. 8 - Prob. 4MCCh. 8 - Prob. 5MCCh. 8 - Prob. 6MCCh. 8 - __________ are spaces that appear at the beginning...Ch. 8 - Prob. 8MCCh. 8 - Prob. 9MCCh. 8 - Prob. 10MCCh. 8 - Prob. 11MCCh. 8 - The __________ file format is commonly used to...Ch. 8 - A __________ is a data type you can create that...Ch. 8 - Prob. 14MCCh. 8 - Prob. 15MCCh. 8 - When you create a(n) __________, you specify a set...Ch. 8 - Prob. 17MCCh. 8 - Prob. 18MCCh. 8 - Prob. 1TFCh. 8 - Prob. 2TFCh. 8 - Prob. 3TFCh. 8 - Prob. 4TFCh. 8 - Prob. 5TFCh. 8 - Structure objects can be passed into a method only...Ch. 8 - Prob. 7TFCh. 8 - Prob. 8TFCh. 8 - An enum declaration can only appear inside the...Ch. 8 - The integer values that you assign to enumerators...Ch. 8 - You can compare enumerators and enum variables...Ch. 8 - Prob. 12TFCh. 8 - What method can be used to convert a char variable...Ch. 8 - List the method you would use to determine whether...Ch. 8 - Prob. 3SACh. 8 - Briefly describe each of the following string...Ch. 8 - Prob. 5SACh. 8 - Prob. 6SACh. 8 - Assume an application contains a structure named...Ch. 8 - Can enumerators be used in a loop to step through...Ch. 8 - Prob. 9SACh. 8 - Prob. 10SACh. 8 - Prob. 1AWCh. 8 - Prob. 2AWCh. 8 - Look at the following structure declaration:...Ch. 8 - Declare an enumerated data type named Direction...Ch. 8 - Prob. 5AWCh. 8 - Prob. 1PPCh. 8 - Prob. 2PPCh. 8 - Sentence Capitalizer Create an application with a...Ch. 8 - Vowels and Consonants Create an application with a...Ch. 8 - Prob. 5PPCh. 8 - Prob. 6PPCh. 8 - Prob. 7PPCh. 8 - Prob. 8PPCh. 8 - Alphabetic Telephone Number Translator Many...Ch. 8 - Prob. 10PPCh. 8 - Drink Vending Machine Simulator Create an...Ch. 8 - Prob. 12PP
Knowledge Booster
Similar questions
- Now three isn't going to the loop. How can I prompt the user to enter the college and city five times. Enter the cost and ticket price together. What is the best way?#include "stdafx.h" #include <iostream>#include <cstdlib>#include <ctime>#include <string>#include <vector>#include <cctype>#include <string> using namespace std; string FBTeam;string College;string location; int Price_of_Ticket;int choice; int main(){cout << "--------------------------------------------------------------------------------" << endl;cout << " Texas Colleges " << endl;cout << "--------------------------------------------------------------------------------" << endl;cout << endl << endl;vector<string> CULIST;vector<string> FBTEAM;{repeat:; cout << "\n\n1. Add Colleges and City" << endl;cout << "2. Add Football Team and Ticket Price" << endl;cout << "3. Calculate Total…arrow_forwardHello I need help formatting this code: This is my code: def display_characters(character_list, display_type): # Place your code here print("===================================================") print("- Character (heroes and villains) Summary -") print("===================================================") print("- P W L D Health -") print("---------------------------------------------------") # only hero chracters to be displayed if display_type == 1: for i in range(len(character_list)): if character_list[i][2] == "h": print("- ", end="") print(character_list[i][0], end=" ") print(character_list[i][3], end=" ") print(character_list[i][4], end=" ") print(character_list[i][5], end=" ") print(character_list[i][6], end=" ") print(" -") print("---------------------------------------------------") # only villain characters to be displayed elif display_type == 2: for i in range(len(character_list)): if character_list[i][2] == "v": print("- ", end="") print(character_list[i][0],…arrow_forwardA(n) ________________ element indicates that its contents should be emphasized. A emphasize B focus C strong D em JavaScript support which of the following data types? A Numbers B char C int D doublearrow_forward
- Briefly describe each of the following string object methods: a. Insert b. Remove c. ToLower d. ToUpper e. Trim f. TrimStart g. TrimEndarrow_forwardHello, I have been working on this code for a while now and I have encountered difficulties in getting it to function as intended. Can someone help me with this code and how to fix it? The code I currently have is: import math cs_cred = 0 print("\nQUESTION 1") answer_1 = str.upper(input("Are you a CS major? (Yes or No): ")) answer_2 = "" answer_3 = "" answer_4 = "" answer_5 = "" answer_6 = "" answer_7 = "" CS_277 = "" CS_377 = "" CS_401 = "" answer_8 = "" if answer_1 == "YES": print("\nQUESTION 2") answer_2 = str.upper(input("Have you taken ENGR100? (Yes or No): ")) if answer_2 == "YES" or "NO": print("\nQUESTION 3") answer_3 = str.upper(input("Have you taken CS111? (Yes or No): ")) if answer_3 == "YES" or "NO": print("\nQUESTION 4") answer_4 = str.upper(input("Have you taken CS141? (Yes or No): ")) if answer_4 == "YES" or "NO": print("\nQUESTION 5") answer_5 = str.upper(input("Have you taken CS151? (Yes or No):…arrow_forwardCreate and construct an application that receives a string from the user, counts the number of each lowercase vowel (a, e, i, o, and u) that appear in the entire string, and outputs the results. Give each vowel its own counter. Count and publish the amount of characters that aren't vowels as well.arrow_forward
- The files provided in the code editor to the right contain syntax and/or logic errors. In each case, determine and fix the problem, remove all syntax and coding errors, and run the program to ensure it works properly. // Application looks up home price // for different floor plans // allows upper or lowercase data entry import java.util.*; public class DebugEight3 { publicstaticvoidmain(String[] args) { Scanner input =newScanner(System.in); String entry; char[] floorPlans = {'A','B','C','a','b','c'} int[] pricesInThousands = {145,190,235}; char plan; int x, fp =99; String prompt ="Please select a floor plan\n"+ "Our floorPlanss are:\n"+"A - Augusta, a ranch\n"+ "B - Brittany, a split level\n"+ "C - Colonial, a two-story\n"+ "Enter floorPlans letter"; System.out.println(prompt); entry = input.next(); plan = entry.charAt(1); for(x =0; x < floorPlans.length; ++x) if(plan == floorPlans[x]) x = fp; if(fp =99) System.out.println("Invalid floor plan code entered")); else { if(fp…arrow_forward#Write your class code here using python word = "CANCEL"spaces = 10border = 'x'b1 = buttons(word, spaces, border)print("=======================================================")b2 = buttons("Notify",3, '!')print("=======================================================")b3 = buttons('SAVE PROGRESS', 5, '$')arrow_forwardA palindrome is a word or phrase that is identical when you read from forward or backward, such as the words “racecar” and “madam.” A standard palindrome is similar to a perfect palindrome, except that spaces and punctuation are ignored in a standard palindrome. For example, “Madam, I’m Adam” is a standard palindrome because the characters are identical forward or backward, provided you remove the spaces and punctuation marks. Write a PHP script that checks words or phrases stored in two separate string variables to determine if they are a perfect palindrome. In addition, see if you can modify the program to check for standard palindromes. create a web page with a text field and “Reset” and “Submit” buttons. When a user clicks on the submit button, show the standard and perfect palindromes of the string that was entered in the text field on the same page.arrow_forward
- A palindrome is a word or phrase that is identical when you read from forward or backward, such as the words “racecar” and “madam.” A standard palindrome is similar to a perfect palindrome, except that spaces and punctuation are ignored in a standard palindrome. For example, “Madam, I’m Adam” is a standard palindrome because the characters are identical forward or backward, provided you remove the spaces and punctuation marks. Write a PHP script that checks words or phrases stored in two separate string variables to determine if they are a perfect palindrome. In addition, see if you can modify the program to check for standard palindromes. create a web page with a text field and “Reset” and “Submit” buttons. When a user clicks on the submit button, show the standard and perfect palindromes of the string that was entered in the text field on the same page. Create a separate Index.html and php filearrow_forwardWhat is the output of the following code segment?intc=6,6=12;if(cd);Write(Green);WriteLine(Yellow); Green Yellow GreenYellow nothingarrow_forwardQ3 - Which of the following converts a type to a string in C#? A-Toint64 B-ToSbyte C - ToSingle D-ToStringarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTMicrosoft Visual C#Computer ScienceISBN:9781337102100Author:Joyce, Farrell.Publisher:Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781305480537
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,