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 10MC
Program Description Answer
“Delimiter” refers to the character that separates the tokens.
Hence, the correct answer is option “C”.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Collections that store one or more key-value pairs are called ________.
Java Program
Fleet class- reading from a file called deltafleet.txt-Using file and Scanner
Will be creating a file called newfleet.txt
Instance Variables:o An array that stores Aircraft that represents Delta Airlines entire fleeto A variable that represents the count for the number of aircraft in the fleet• Methods:o Constructor- One constructor that instantiates the array and sets the count to zeroo readFile()- This method accepts a string that represents the name of the file to beread. It will then read the file. Once the data is read, it should create an aircraft andthen pass the vehicle to the addAircraft method. It should not allow any duplicationof records. Be sure to handle all exceptions.o writeFile()- This method accepts a string that represents the name of the file to bewritten to and then writes the contents of the array to a file. This method shouldcall a sort method to sort the array before writing to it.o sortArray()- This method returns a sorted array. The array is…
numbers = [2, 4, 5, 8]
user_input = input ()
while user_input != 'end':
try:
#Possible ValueError
divisorint (user_input)
if divisor > 20:
#Possible NameError
#compute () is not defined
result = compute (result)
elif divisor < 0:
#Possible IndexError
result = numbers [divisor]
else:
# Possible ZeroDivisionError
result = 20 // divisor
print (result, end='.')
except (ValueError, ZeroDivisionError):
print ('r', end=' ')
except (NameError, IndexError):
print ('s', end=' ')
Type the program's output
user_input = input ()
print ('OK')
# // truncates to an integer
Input
-3
three
67
0
10
-8
end
Output
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
- The AppendText method creates a(n) _______object.arrow_forwardimagearrow_forwardJava OOP Write a complete address book maintenance application. The user of the program has four options: Add a new person, delete a person, modify the data of a person, and search for a person by giving the name. Use the AddressBook class, either the original one from the chapter or the modified one from the previous exercises. You have to decide how to allow the user to enter the values for a new person, display person information, and so forth.arrow_forward
- In [8]: # feel free to import what you wwant %matplotlib inline import matplotlib import matplotlib.pyplot as plt import time In [ ]: # recording the time for various calls In [ ]: # the code to plot the curvearrow_forwardWorkArea 1st object 2nd object 3rd object 1- Write the code that declares an array of Rectangle objects, called rectangles, and stores in it three objects with the following data: length width 20 25 30 10 15 30 Area of object 1: 200 Area of object 2: 375 Area of object 3: 900 Interactive Session ? 2- Write the code of a for loop that displays the areas of n objects from the rectangles array you declared in the previous task. The output of the for loop. when n = 3, should look like this: Note: Make sure to use the integer n in your for loop. Workbench Additional Notes: Regarding your code's standard output, CodeLab will ignore case errors and will ignore whitespace (tabs, spaces, newlines) altogether. Visible newlines 0 00 0? 0! 0x 1- Visible whitespace MacBook Air Display stdin ✔Display stdout Millarrow_forwardAttached Files: getRandomLib.h: // This library provides a few helpful functions to return random values // * getRandomInt() - returns a random integer between min and max values // * getRandomFraction() - returns a random float between 0 and 1 // * getRandomFloat() - returns a random float between min and max values // * getRandomDouble() - returns a random double between min and max values // * getRandomBool() - returns a random bool value (true or false) // * getRandomUpper() - returns a random char between 'A' and 'Z', or between min/max values // * getRandomLower() - returns a random char between 'a' and 'z', or between min/max values // * getRandomAlpha() - returns a random char between 'A' and 'Z' or 'a' and 'z' // * getRandomDigit() - returns a random char between '0' and '9', or between min/max values // * getRandomChar() - returns a random printable char // // #define GET_RANDOM_LIB_H #include <cstdlib> #include <random> #include <ctime> using namespace…arrow_forward
- JAVA PPROGRAM ASAP Please Modify this program ASAP BECAUSE IT IS HOMEWORK ASSIGNMENT so it passes all the test cases. The program must pass the test case when uploaded to Hypergrade. Also, for test cases 1-4 it wants only to input Please enter the file name or type QUIT to exit: then input the file and display the Total number of words. For test cases 5 and 7 it wants to only to input Please enter the file name or type QUIT to exit then input input5.txt and then display File: input5.txt does not exist.\n then display Please enter the file name again or type QUIT to exit:\n then type input1.txt to display the total number of words or type quit to exit the program. For test case 6 it wants only to Please enter the file name again or type QUIT to exit:\n then type quit to exit the porgram. Chapter 9. PC #10. Word Counter (page 610) Write a program that asks the user for the name of a file. The program should display the number of words that the file contains. Input…arrow_forward/** * Makes a move on the board the board. Moves 'a' through 'e' shift the given row * to the left while moves 'A' through 'E' shift the given row to the right. * Moves 'v' through 'z' shift the given column down while moves 'V' through 'Z' * shift the given column up. * * @param m the move to make. * @throws IllegalArgumentException if the argument is not a valid move letter. */ public void move(char m) { throw new RuntimeException("Not implemented"); } The board is 5 X 5.arrow_forwardC++HurdleWords The HurdleWords class is mostly provided to you. HurdleWords is constructed from two files in the data/ folder: ● valid_guesses.txt (all 5 letter guesses considered to be valid words to guess), and ● valid_hurdles.txt (all words that may be selected to be the secret Hurdle.) ● Note: you may edit both text files if you’d like to add custom words to your game. HurdleWords stores all potential valid Hurdles from valid_hurdles.txt into a vector of strings (valid_hurdles_), and all valid guesses from valid_guesses.txt into an unordered set of strings (valid_guesses_). A set is simply a data structure that contains no duplicates and allows for a speedy lookup to check if a given element exists within the set. Because there are over 10,000 valid guesses, we store them in an unordered set to leverage their speediness, as you will need to check if a user-submitted guess is considered valid (i.e. their guess is considered a valid guess in the dictionary). You are responsible for…arrow_forward
- >> classicVinyls.cpp For the following program, you will use the text file called “vinyls.txt” attached to this assignment. The file stores information about a collection of classic vinyls. The records in the file are like the ones on the following sample: Led_Zeppelin Led_Zeppelin 1969 1000.00 The_Prettiest_Star David_Bowie 1973 2000.00 Speedway Elvis_Presley 1968 5000.00 Spirit_in_the_Night Bruce_Springsteen 1973 5000.00 … Write a declaration for a structure named vinylRec that is to be used to store the records for the classic collection system. The fields in the record should include a title (string), an artist (string), the yearReleased (int), and an estimatedPrice(double). Create the following…arrow_forwardThe variable myString is declared as following: char myString[10]; How many bytes of memory does myString use? Hint: the sizeof function can return the number of bytes used by an object. O 1 O 10 O 80arrow_forwardTopic : Multiple Selection Control Structure Instruction : 1. Save your java file name same as your class name in the coding. Example : Save as : Munirah_S3BT20.java Class name for coding : class Munirah_S3BT20 Problem Description : Maths Tuition Centre asked you as a senior programmer to develop a Java program. The program is to calculate the total fee to be paid for each student. Each student must pay RM10 for the learning module. Tuition centre also gives the discount based on total charge. Below are the charge rate provided by tuition centre: Hour Charge Discount First hour RM15 per hour 3% Next 5 hours RM10 per hour 7% 7 hours and above RM5 per hour 12% *Total fee will be granted with one-time discount only The program will allow users to enter student's names and total hours. Then, the program will calculate the total fees including the learning module and total charge. Begins your code with name, class, matric number, and problem description as a comment. Use 2 decimal point…arrow_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 - CONSIGNMENT
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