
Programming and Problem Solving with C++: Comprehensive
6th Edition
ISBN: 9781284076592
Author: Dale, Nell
Publisher: JONES+BART
expand_more
expand_more
format_list_bulleted
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
1. Create a Person.java file. Implement the public Person and Student classes in Person.java, including all the variables and methods in
the UMLS.
Person
-name: String
-street: String
-city: String
+Person(String name, String, street, String, city)
+getName(): String
+setName(String name): void
+getStreet(): String
+setStreet(String street): void
+getCity(): String
+setCity(String City): void
+toString(): String
Student
-Id: int
+Person(String name, String, street, String, city, int Id)
+getId(): int
+setId(int Id): void
+toString(): String
2. Create a StudentTest.java file. Implement a public StudentTest class with a main method. In the main method, create one student
object and print the object using System.out.println().
Your printing result must follow the example output:
name: Mike, street: Morris Ave, city: Union, Id: 1000
Hint: You need to modify the toString methods in the Student class and Person class!
1) Apply the Paint Blue algorithm discussed in class to the following Finite Automata.
a
a
a
b
b
a
COIS-3050H-R-W01-2025WI-COMB Formal
Languages & Automata
a
b
Show the status of the Finite Automata at the conclusion of the Paint Blue Algorithm (mark the
visited states with an X and only include edges that have not been followed).
2) Use the pumping lemma to prove the following language is nonregular:
L= {ab} = {abbb, aabbbbbb, aaabbbbbbbbb, ...}
3) Find CFGs that for these regular languages over the alphabet Σ= {a, b}. Draw a Finite Automata
e CFG.
1
COIS-3050H-R-W01-2025WI-COMB Formal
anguages & Automata
Is that contain the substring aba.
(b) The language of all words that have an odd number letters and contains the string bb.
(c) The language of all words that begin with the substring ba and contains an odd number of
letters.
4) Convert the following FA into a PDA.
a
a
S±
b
a
a
Ν
Ꮓ
Knowledge Booster
Similar questions
- COIS-3050H-R-W01-2025WI-COMB Formal ministic PDA. Are the following words accepted by this Languages & Automata UI MIUSɩ that aTU I ed, indicate which state the PDA is in when the crash occurs. (a) aabbaa (b) aaabab (c) bababa Start (d) aaaabb A Accept Read₁ Push a (e) aaaaaa a b Read, Popi a a,b A Read₂ Accept A Pop₂arrow_forward5) Eliminate the A-productions from the following CFG: Abc COIS-3050H-R-W01-2025WI-COMB Formal Languages & Automata BAabC C CaA | Bc | A 6) Convert the following CFG into CNF. S→ XYZ XaXbS | a |A YSbS | X | bb Z→ barrow_forwardNeed help answering these questions!1. Design a While loop that lets the user enter a number. The number should be multiplied by 10, and the result stored in a variable named product. The loop should iterate as long as the product contains a value less than 100. 2. Design a For loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 . . . 1000 3. Convert the While loop in the following code to a Do-While loop: Declare Integer x = 1 While x > 0 Display "Enter a number." Input x End Whilearrow_forward
- Need help with these:Design a While loop that lets the user enter a number. The number should be multiplied by 10, and the result stored in a variable named product. The loop should iterate as long as the product contains a value less than 100. 2. Design a For loop that displays the following set of numbers: 0, 10, 20, 30, 40, 50 . . . 1000 3. Convert the While loop in the following code to a Do-While loop: Declare Integer x = 1 While x > 0 Display "Enter a number." Input x End Whilearrow_forwardConvert the While loop in the following code to a Do-While loop: Declare Integer x = 1 While x > 0 Display "Enter a number." Input x End Whilearrow_forwardPython - need help creating a python program that will sum the digits of a number entered by the user. For example if the user inputs the value 243 the program will output 9 because 2 + 4 + 3 = 9. The program should ask for a single integer from the user, it should then calculate the sum of all the digits of that number and output the result.arrow_forward
- I need help with this in Python (with flowchart): Im creating a reverse guessing game. Then to choose a random number from 1 to 100 and the computer program will attempt to guess it, displaying the directions calculated or not. The guess will be displayed and the user will answer if it was correct or not. If correct, the game ends, if not then the computer asks if the guess was too high or too low. Finally inputting an answer and the computer generates a new guess within the proper range. Oh and to make sure the program doesnt guess outside of the ranges produced by the inputs of “too high” and “too low”. The program ending when the user guesses correctly or after the program takes 6 guesses. HELP ASAP!arrow_forwardI need help with this in Python (with flowchart): Im creating a reverse guessing game. Then to choose a random number from 1 to 100 and the computer program will attempt to guess it, displaying the directions calculated or not. The guess will be displayed and the user will answer if it was correct or not. If correct, the game ends, if not then the computer asks if the guess was too high or too low. Finally inputting an answer and the computer generates a new guess within the proper range. Oh and to make sure the program doesnt guess outside of the ranges produced by the inputs of “too high” and “too low”. The program ending when the user guesses correctly or after the program takes 6 guesses. HELP ASAP!arrow_forwardNeed help finding errors in my pseudocode (Two)! Declare Boolean finished = False Declare Integer value, cube While NOT finished Display "Enter a value to be cubed." Input value; Set cube = value^3 Display value, " cubed is ", cube End While Next, I intended the following pseudocode to display the numbers 1 through 60, and then display the message "Time’s up!". Doesnt work and has error. Declare Integer counter = 1 Const Integer TIME_LIMIT = 60 While counter < TIME_LIMIT Display counter Set counter = counter + 1 End While Display "Time's up!"arrow_forward
- Having error in pseudcode; wanting to get five sets of two numbers each, calculate the sum of each set, and calculate the sum of all the numbers entered. Not functioning as intended and can't find the error.Code: // This program calculates the sum of five sets of two numbers. Declare Integer number, sum, total Declare Integer sets, numbers Constant Integer MAX_SETS = 5 Constant Integer MAX_NUMBERS = 2 Set sum = 0; Set total = 0; For sets = 1 To MAX_NUMBERS For numbers = 1 To MAX_SETS Display "Enter number ", numbers, " of set ", sets, "." Input number; Set sum = sum + number End For Display "The sum of set ", sets, " is ", sum "." Set total = total + sum Set sum = 0 End For Display "The total of all the sets is ", total, "."arrow_forwardNeed help converting loops!1. Convert the following While loop to a For loop: Declare Integer count = 0 While count < 50 Display "The count is ", count Set count = count + 1 End While _________________________________________________ 2. Convert the following For loop to a While loop: Declare Integer count For count = 1 To 50 Display count End Forarrow_forwardNeed help making this!1.Design a nested loop that displays 10 rows of # characters. There should be 15 # characters in each row. 2. Design a nested set of for loops that displays the following arrangements of ‘X’ characters X XX XXX XXXX XXXXX XXXXXXarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage LearningC++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning
- Systems ArchitectureComputer ScienceISBN:9781305080195Author:Stephen D. BurdPublisher:Cengage LearningEBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:Cengage

C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning

C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr

New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning

Systems Architecture
Computer Science
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Cengage Learning

EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage