Computer Science: An Overview (12th Edition)
12th Edition
ISBN: 9780133760064
Author: Glenn Brookshear, Dennis Brylow
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 6, Problem 37CRP
Program Plan Intro
Syntax diagram:
Syntax diagram is the
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Create a small Grading System in C language that will ask the user to enter the following
For midterm periodTotal score on quizzesTotak score on assignmentsNumber of AttendanceMidterm exam score
For final periodTotal score on quizzesTotal score on assignmentsNumber of attendanceFinal exam score
To get the midterm and final grade:Quizzes and Assignments (60%)Attendance (10%)Major Exam (30%)
Formulas:
Quizzes and Assignments ((Total Score on Quizzes + Total Score on Assignment / Total Number of Items of Quizzes and Assignments) 50 + 50) * 60%
Attendance ((Number of times present/ Total number of Meetings) • 50 + 50) * 10%
Major Exam ((Major Exam Score/Total number of Items) * 50+50) • 30% Then to get the final rating, divide the midterm average and final average by 2
Final Grade = Midterm Average +FinalAverage / 2Example:Suppose the values are from midterm period ((15+10/30) *50 +50) *60%(0.83 *50 + 50) • 60%91.67 * 60%55
((15/15) *50+50) *10%(1 •50 + 50) * 10%100 • 10%10
((25/30) *50+…
L1 is the language of all strings expressed in base 3 and begining with a 1 or 2 that, when interpreted as a decimal integer, is a multiple of 5. For example, strings like 12, 101, 120, 110121 are in the language; strings that begin with 0 or are not multiples of 5 such as 0, 011, 112, 2201 are not in the language. The alphabet is E={0,1,2}. Draw the state transition diagram of a deterministic finite automata (DFA) accepting the language L1. Explain shortly the logic behind your design for this DFA.
In C# Language
Chapter 6 Solutions
Computer Science: An Overview (12th Edition)
Ch. 6.1 - In what sense is a program in a third-generation...Ch. 6.1 - We can summarize the imperative programming...Ch. 6.1 - Prob. 4QECh. 6.2 - Why is the use of a constant considered better...Ch. 6.2 - Prob. 2QECh. 6.2 - Prob. 3QECh. 6.2 - Identity some common control structures found in...Ch. 6.2 - What is the difference between an array and an...Ch. 6.3 - Prob. 1QECh. 6.3 - Prob. 2QE
Ch. 6.3 - Why do many programming languages implement I/O...Ch. 6.3 - Prob. 4QECh. 6.3 - Prob. 5QECh. 6.4 - Prob. 1QECh. 6.4 - What is a symbol table?Ch. 6.4 - What is the difference between a terminal and a...Ch. 6.4 - Prob. 4QECh. 6.4 - Prob. 5QECh. 6.4 - Prob. 6QECh. 6.5 - What is the difference between an object and a...Ch. 6.5 - Prob. 2QECh. 6.5 - Suppose the classes PartTimeEmployee and...Ch. 6.5 - What is a constructor?Ch. 6.5 - Why are some items within a class designated as...Ch. 6.6 - Prob. 1QECh. 6.6 - Prob. 2QECh. 6.6 - Prob. 3QECh. 6.7 - Prob. 2QECh. 6.7 - Prob. 3QECh. 6.7 - Prob. 4QECh. 6 - Prob. 1CRPCh. 6 - Translate the following Python program into the...Ch. 6 - Prob. 3CRPCh. 6 - Why was it necessary to identify the type of data...Ch. 6 - Prob. 6CRPCh. 6 - Suppose the function f expects two numeric values...Ch. 6 - Suppose f is a function that returns the result of...Ch. 6 - Prob. 9CRPCh. 6 - Summarize the distinction between a machine...Ch. 6 - John Programmer argues that the ability to declare...Ch. 6 - Summarize the distinction between declarative...Ch. 6 - Explain the differences between a literal, a...Ch. 6 - a. What is operator precedence? b. Depending on...Ch. 6 - Prob. 16CRPCh. 6 - What is the difference between the meaning of the...Ch. 6 - Draw a flowchart representing the structure...Ch. 6 - Prob. 19CRPCh. 6 - Prob. 20CRPCh. 6 - Draw a flowchart representing the structure...Ch. 6 - Rewrite the following program segment using a...Ch. 6 - Summarize the following rats-nest routine with a...Ch. 6 - Prob. 24CRPCh. 6 - Prob. 25CRPCh. 6 - Suppose the variable X in a program was declared...Ch. 6 - Prob. 27CRPCh. 6 - Why would a large array probably not be passed to...Ch. 6 - Sometimes an actual parameter is passed to a...Ch. 6 - Prob. 32CRPCh. 6 - What ambiguity exists in the statement X = 3 + 2 ...Ch. 6 - Suppose a small company has five employees and is...Ch. 6 - Prob. 35CRPCh. 6 - Prob. 36CRPCh. 6 - Prob. 37CRPCh. 6 - Prob. 38CRPCh. 6 - Prob. 39CRPCh. 6 - Design a set of syntax diagrams that describes the...Ch. 6 - Prob. 41CRPCh. 6 - Prob. 42CRPCh. 6 - Add syntax diagrams to those in Question 5 of...Ch. 6 - Prob. 44CRPCh. 6 - What code optimization could be performed by a...Ch. 6 - Simplify the following program segment Y = 5 if (Y...Ch. 6 - Simplify the following program segment while (X !=...Ch. 6 - In an object-oriented programming environment, how...Ch. 6 - Describe how inheritance might be used to develop...Ch. 6 - What is the difference between the public and...Ch. 6 - a. Give an example of a situation in which an...Ch. 6 - Describe some objects that might be found in a...Ch. 6 - Prob. 53CRPCh. 6 - Prob. 54CRPCh. 6 - Prob. 55CRPCh. 6 - Prob. 56CRPCh. 6 - Prob. 57CRPCh. 6 - Prob. 58CRPCh. 6 - Prob. 59CRPCh. 6 - In general copyright laws support ownership rights...Ch. 6 - By using a high-level programming language, a...Ch. 6 - Prob. 3SICh. 6 - Prob. 4SICh. 6 - Prob. 5SICh. 6 - Suppose an amateur programmer writes a program for...Ch. 6 - Prob. 7SI
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- A phone number, such as (212) 767-8900, can be thought of as having three parts: e.g, the area code (212), the exchange (767), and the number (8900). Write a program that uses a structure to store these three parts of a phone number separately. Call the structure phone. Create two structure variables of type phone. Initialize one, and have the user input a number for the other one. Then display both numbers. The interface might look like this: Enter area code: Enter exchange, Enter number: 415 555 1212 Then display like below: My number is (212) 767-8900 Your number is (415) 555-1212arrow_forwardJeff and Gern run a furniture company specializing in tables and chairs. To save time, when a new order comes in, a special shorthand is used to describe the order. The rules for their shorthand are as follows • The first character is "T" for a set of tables, or "C" for a set of chairs. If the order includes both tables and chairs, the order shorthand begins with "TC" • Next they indicate the number of tables or chairs for the order. If the order includes both tables and chairs, they'll write the number of table first, then the number of chairs, separated by a dash. An order comes in for three standard tables constructed using Oakwood. What would the order shorthand be for this order?arrow_forwardWhat are the two distinct goals of syntax analysis?arrow_forward
- The code in caesar5.py can be used as a word unscrambler and an anagram maker. Describe how you can accomplish both word-unscrambling and anagram generation with examples.arrow_forwardSolve in c programming language. This is one question comprising 2 pictures.arrow_forwardDiscrete Structures:arrow_forward
- ARDUINO LANGUAGE We have two push buttons and three LEDs (Red, Green and Blue). When the user presses button 1, the red LED will turn on and the blue LED will turnoff. If the user presses button 1 again the red LED will turn off and the blue LED willturn on. When the user presses button 2, the green LED will blink on and off 3 times. Considera delay of 1 second between blinks.Note: while the green LED is blinking, button 1 may not respond to presses. This is normaland acceptable for your code.arrow_forwardIN C PROGRAMMING LANGUAGE AND COMMENT EVERY STEP PLEASE Write a program that takes verbs and forms their past tense on the basis of these rules: a. If verb ends in “e”, add “d”. b. If verb ends in “ss” or “gh”, add “ed”. c. In all other cases, inform the user that the verb may have an irregular past tense. Print each verb and its past tense. Try the following data: smile discuss confess declare laugh run cough teach buyarrow_forwarddevelop software using a regular expression module to process the following phone numbers.you are to extract the area code,trunk, number, and optionally an extension for each number. You may use the regular expression module in the language of your choice, please note that we covered the syntax for Perl 5 which is imitated by python 3, javascript, C++, and C#. Java, too. 800-555-1212 800 555 1212 800.555.1212 (800) 555-1212 1-800-555-1212 800-555-1212-1234 800-555-1212x1234 800-555-1212ext. 1234 1-(800) 555.1212 #1234 Reporting: Demonstrate your results by outputting the extracted information for each input number. Your report should be one page and it should be include a discussion of your use of the regular expression module.arrow_forward
- In Scheme please. Please do not copy and paste the wrong answer that is out there. Dislike will be given to you. Write a Scheme procedure (clean-list lst) that returns the list with all non-numeric elements removed. You can use this for #8 & #9. Copy your Scheme code without formatting in the box below: Copy your output without formatting in the box below:arrow_forwardIllustrate your knowledge of C-Programming by implementing a ‘Game of Dice’.User will start with 3 lives and 100 initial points. Program will ask the user to roll three dices. If sum of three dices is more than or equal to 15, user will get 10 points. If sum is in the range 10 to 14, user will get 5 points. If sum is less than 10, user will get -10 points. If sum is 3, user will lose one life. For every increase of 50 points, user will get one new life and for every decrease of 50 points, user will lose one life. If at any point, user has 200 or more points, program will display message, ‘Congratulations, You Win!!!’ and end. If user has zero lives or zero points, program will display the message ‘Game Over. Sorry, You Lose.’ and end.Program will use the following user defined functions to implement the game Function ‘DisplayGameRules()’ will display the following message on screen.############################################## ROLL the DICE GAME…arrow_forwardAlphabet = {0,1}. Define a DFA for the language. {w | w does not (!) contain the substring 011} %3Darrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Programming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTEBK JAVA PROGRAMMINGComputer ScienceISBN:9781305480537Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
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