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
Write a program in C language that will allow a user to add, search (search by last name or by number) and display contacts in a phone book. Create a structure called “ContactInfo” with members firstName, lastName, phoneNumber, emailAddress.
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+…
An investment firm xyz has a monthly income scheme that gives a 6.6%
annual interest on the money invested. Create an interest calculator in C
language in which the user can enter the principle amount and the
program prints the monthly interest that the user will get every month.
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
- 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.arrow_forwardIn C# Languagearrow_forwardphyton languagearrow_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_forwardprogramming for business field in python write a program to find the depreciation value of an asset (property) by reading the purchase value of the asset (amt), year of the service (year) and the value of the depreciationarrow_forwardARDUINO 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_forward
- IN 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_forwardCreate a sentence parser code (any language such as: java, javascript, python, C++, etc.) that when I input these sentences below it is allowed. I want to travel I like Texas I want to swim Go to South Padre Get a hotel On the beach I want a view Love the sunrise A nice vacation Book a boat Need this trip Waves are high Prefer the boat I enjoy speed I love waterarrow_forward
- Illustrate 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_forwardIN THE C PROGRAMMING LANGUAGE j = 15; k = 9 // what are the values for n,m,and p after these operations: --j ; k++ ; n = j - ++k; m = j-- + k--; p = k + j;arrow_forwardWrite a program using the language C #. The user enters three grades for a student, and then prints his average, Passed or Failed. if result > or rqual 50 print pass if result < 50 print fail and then prints out a rating of the student Excellent if averge < 100 and average > or equal 90 Very Good if averge < 90 and average > or equal80 Good if averge < 80 and average > or equal 70 medium if averge <70 and average > or equal 60 Acceptable if averge <60 and average > or equal 50 fail if averge <50arrow_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