Letter/Digit addChar; getChar Letter Start id return lookup (lexeme) addChar; getChar Digit +/- int return Int Lit addChar; getChar return Float Lit addchar; getchar Digit addChar; getChar A Digit addchar; getchar DOT (.) addchar, getchar DOT (.) addchar; getchar float Digit addchar; getchar
Q: The aim of this lab is to familiarize yourself with reading and processing directories as well as…
A: Kindly note: Here are the steps I have used to generate this programI have used Dev-C++ IDE to write…
Q: For each graph below, state the largest integer weight for directed edge (B,C) that makes the given…
A: The largest integer weight for edge (B, C) that makes the shortest path from A to E is 8.…
Q: Three strings are read from input and stored in the list zoo_animals. Then, three more strings are…
A: The objective of the question is to create a new list that combines the elements of two existing…
Q: The following is true about 4th Generations of digital computing, except; O A. O B. O O O C. D. The…
A: The objective of the question is to identify the statement that is not true about the 4th Generation…
Q: Using the MARIE computer assembly language, write a program that computes the following expression:…
A: The objective of the question is to write a program in MARIE assembly language that calculates the…
Q: The following image shows a graph with 7 vertices (nodes) labelled from 1 to 7 and edges connecting…
A: Graph Initialization:Establish a graph comprising seven vertices, each uniquely labeled from 1 to…
Q: List pianists_list is read from input. Perform the following tasks: Assign backup_list with a copy…
A: The objective of the question is to perform certain operations on a list in Python. The operations…
Q: What cryptography protocols are used to secure data in transit?
A: The objective of the question is to identify the cryptographic protocols that are used to secure…
Q: Part A Write an application called PastPresentFuture that uses the LocalDate class to access the…
A: In this question we have to create a Java application named PastPresentFuture, which uses the…
Q: Please view attachment before answering. The attachment is the table and its contents. I am in need…
A: Part A of the question involves creating a query that transforms the employee names to a specific…
Q: 1. Determine the running time of the following algorithm. Write summations to represent loops and…
A: The objective of the question is to determine the running time of the given algorithm. This involves…
Q: Draw DFAs for the following language specifications. All strings on Σ ={A, B, C} that contain each…
A: DFA stands for Deterministic Finite Automata. It doesn't accept null moves and doesn't contain…
Q: Arrays write a C++ program that will declare two static arrays where each will hold the contents of…
A: Define a class named ArrayManipulator.Declare two private member arrays array1 and array2, each of…
Q: In your own words, what is identity theft? Provide two forms of identity theft? You are required to…
A: Identity theft is a type of fraud that involves the unauthorized use of another person's personal…
Q: Given a text-file named superbowl_games.txt shown in the following images where each column in the…
A: First, the code defines a Function that should validate the Roman Numerals:Then the code should…
Q: Assigning group access controls eliminates individual accountability. Select one: O True
A: Accountability means that anyone can trace the activities on the protected system to a particular…
Q: A geometric distribution is defined as the number of trials until the first success is observed. Or…
A: The distributions we are working with are geometric.Javi has a 0.48 percent chance of creating a…
Q: Using the MARIE computer assembly language, write a program that computes the following expression:…
A: The MARIE assembly language provides a solution to the problem of calculating the expression z =…
Q: Multiple key-value pairs, each representing a hotel room number and current temperature, are read…
A: The objective of the question is to sort the dictionary 'room_temperatures' by keys and print the…
Q: Draw a class diagram for the above scenario. Bell’s hospital has a patient management system. A…
A: Within Bell's Hospital, the Patient Management System is essential to the coordination of the…
Q: Ticket-issuing system: An automated ticket machine sells Airline tickets. Users select their…
A: Non-functional requirements, also known as quality attributes or system qualities, specify criteria…
Q: Use base 10 blocks to model the number 0.286 in two different ways. Using decimal place values key.
A: Decimal Place Value:Decimal place value refers to the position of a digit in a number to the right…
Q: Draw an ER diagram for the following scenarios:
A: The question asks to create an Entity-Relationship (ER) diagram for a library system at Stanford…
Q: A sequence (bn)neNo is called strictly increasing if b₁ M. We can represent a sequence (bn) by a…
A: def threshold_index(sequence_func, M): n = 0 while sequence_func(n) < M: n += 1…
Q: Refer to image and provide detailed answers!
A: The wires in a twisted-pair copper wire are twisted to reduce electromagnetic interference. By…
Q: Use Matlab to create a code for the following ;…
A: In this question we have to write a MATLAB Code for the BMI Index with the graph plotting.Let's code…
Q: Output the attributes of the BookInfo object book as follows: 'Genre: ' followed by book's genre…
A: The objective of the question is to print the attributes of an instance of the BookInfo class. The…
Q: The program opens up the data.txt file using the fopen function and will read the data into two…
A: In this question we have to write a C Program where we need to read data from a text file (data.txt)…
Q: Basic output with variables This zyLab activity prepares a student for a full programming…
A: 1. Start the program.2. Prompt the user to enter an integer and store it in a variable named…
Q: Integer stride_len is read from input. Assign variable sub_string with every stride_len element of…
A: The objective of the question is to create a substring from the first half of the original string.…
Q: A sequence (bn)neN is called strictly increasing if b, M. We can represent a sequence (bn) by a…
A: def threshold_index (sequence, M): n = 0while sequence(n) < M: n += 1 return ndef…
Q: Define a function read_data that accepts a single argument corresponding to the filename, and…
A: 1. Start the function definition for read_data, which takes a single argument: filename.2.…
Q: Ex 8) Draw a flowchart for a computer program that will receive numbers andoutput if they are…
A: Algorithm:Initialize a counter to 0Start a loopGet a number from the userIf the number is 0, break…
Q: O A. B. O C. O D. _include product price changes, work schedules, departmental reorganization, and…
A: The correct answer is A. Tactical decisions. These decisions typically involve short-term planning…
Q: Q4. Generally in geographical routing, how a node decides the next hop forwarding node? Will such…
A: Wireless ad hoc networks employ geographic routing, a routing strategy in which nodes choose which…
Q: er gallon (mpg). Include get and set methods for each field. Do not allow the ID to be negative or…
A: Below a function called enterData() that prompts the user for the data values for an Automobile…
Q: Create a fee invoice application for students attending Valence College, a college in the State of…
A: The answer to the question above is given below.Explanation:Here's the completed code: import…
Q: Given the array BWT[1:n], write the pseudocode to compute the array rank[1:n] in O(n ) time,…
A: Particularly in bzip2, the Burrows-Wheeler Transform (BWT) is essential for data compression…
Q: Warm up: Variables, input, and type conversion (1) Prompt the user to input an integer between 32…
A: 1. Prompt the user to input an integer between 32 and 126, a float, a character, and a string,…
Q: The Web is a one-to-one communication model. O True O False
A: The objective of the question is to determine whether the web operates on a one-to-one communication…
Q: Write the Flowchart for the following programming problem based on the pseudocode below.
A: The given problem entails designing a program that enables a student to input their name and then…
Q: Using the MARIE computer assembly language, write a program that computes the following expression:…
A: The final answer is 720. This is the result of computingz←(2×3)×(4×5)×6Explanation:Approach to…
Q: Why should artifical intelligence (AI) not be used in security and surveillance?
A: The question is asking for reasons why the use of artificial intelligence (AI) in security and…
Q: Define the Artist class with a constructor to initialize an artist's information and a print_info()…
A: Artist Class Definition:Establish a class named "Artist" incorporating private attributes: name,…
Q: How the biggest businesses use CRM: A Case of Wells Fargo Here we have a company tasked with keeping…
A: Question 1: Four Benefits of Implementing a CRM System in an Organization1. Enhanced Customer…
Q: The Internet does not have a headquarters or governing body. O True O False
A: The objective of the question is to determine whether the Internet has a central headquarters or a…
Q: Give the asymptotic complexity of each of the following functions in simplest terms and then order…
A:
Q: Explain the concept of pipelining in computer architecture and discuss how it improves processor…
A: The computer architecture can be defined in broader terms as the whole process of planning and…
Q: A Virtual Private Network is a type of LAN which provides sharing of files and peripherals between…
A: The objective of the question is to determine whether the statement about Virtual Private Networks…
Q: Using the table, either buying a network of PCs for a department at your workplace or outfitting a…
A: Multicriteria analysis is a decision-making methodology that involves assessing and comparing…
Try recognizing the following tokens with the given state diagram. For each part, describe how the token is accepted or reject.
a) -.453
b) 0.000032
Step by step
Solved in 1 steps
- Please add comments to my code.----------------------------------------------------- let currProblem = 1;let currScore = 0;let answer; function updateScoreAndQuestion() { let problem = document.getElementsByClassName("currentProblem")[0]; problem.innerText = currProblem.toString(); let score = document.getElementsByClassName("currentScore")[0]; score.innerText = currScore.toString(); if(currProblem <= 10) { newProblem(); } else { let hide = document.querySelectorAll('.show-hide'); hide.forEach(element => { element.style.display = "none"; currProblem = 10; problem.innerText = currProblem.toString(); }) }} function start() { let answers = document.querySelectorAll("li"); answers.forEach(element => { element.addEventListener("click", event => { let choice = element.innerText; if(choice.toString() === answer.toString()) {…Java Language Please help me fix all the error. I very appreciate it Coding: import java.util.Scanner;public class Main { /*static displayline(); char line; { for (int i = 1; i < line; i++ ) { System.out.println ("_"); } } */ public static void main(String[] args) { System.out.println("Clinic Management\n"); int PatAge, Pnumber,age; int cmedicine, cost, Pcost, total, newTotal; String PatName, Pgender, Pdisease, Pmedicine; char typeofmedicine; Scanner scan = new Scanner(System.in); System.out.println("Patient Name :"); String name = scan.next(); name = name + scan.nextLine(); System.out.println("Patient Age :"); age = scan.nextInt(); System.out.println("Patient Gender :"); String gender = scan.next(); System.out.println("Patient Phone Number :"); Pnumber = scan.nextInt(); System.out.println("Patient Disease :" ); String disease =…Using JAVASCRIPT write an object prototype for a Person that has a name and age, has a printInfo method, and also has a method that increments the persons age by 1 each time the method is called. Create two people using the 'new' keyword, and print both of their infos and increment one persons age by 3 years. Use an arrow function for both methods */ // Create our Person Prototype // Use an arrow to create the printInfo method // Create another arrow function for the addAge method that takes a single parameter // Adding to the age
- object oriented programming using c++ class decleration: class MyPhoneBook{ string* names; string* phones; int phoneBookSize; public: MyPhoneBook(int); //Takes size MyPhoneBook(const MyPhoneBook&); //Copy Constructor bool addEntry(string ,string); bool displayEntryAtIndex(int); void displayEntryAtIndices(int*); void displayAll(); int* findByName(string); int* findByPhone(string); bool updateNameAt(string, int); bool updatePhoneAt(string, int); ~MyPhoneBook();};Javascript toggleCommentSection function The function toggleCommentSection should exist. The function toggleCommentSection should return undefined if not passed a parameter. The function toggleCommentSection should return null if passed a parameter that does not match a post ID. The function toggleCommentSection should select and return the correct section element. The function toggleCommentSection should toggle the 'hide' class on the section The following are requirements of the function toggleCommentSection: element.toggleCommentSection a. Receives a postId as the parameter b. Selects the section element with the data-post-id attribute equal to the postId received as a parameter c. Use code to verify the section exists before attempting to access the classList property d. At this point in your code, the section will not exist. You can create one to test if desired. e. Toggles the class 'hide' on the section element f. Return the section element Here is what I have so far:…Jordan University of Science and TechnologyCS415 Contemporary Programming TechniquesMidterm Exam – Second semester 2021Name: ID: Section:Important note: your code must compile correctly and run without errors.Otherwise your code will get the grade zero.Question 1: Implement a java class called ParsingCustomerRecords that has thefollowing data members and functions:ParsingCustomerRecods- customerRecords: array of strings- result: string variable- recordsNumber: int variable-fileName: string variable+ Constructor(String filename, int recordsNumber)+ void Reader()+ void Executor()+ void showResult()+ String toString()All of the data members are private, and all of the methods are public.Constructor has two parameters which are (1) the file name in which Customers’ recordsare stored, and (2) the number of the records in the file. The constructor functionality is toassign suitable initial values to the fileName and recordsNumber data members. Theconstructor also should instantiate the…
- Book Donation App Create a book-app directory. The app can be used to manage book donations and track donors and books. The catalog is implemented using the following classes: 1. The app should have donors-repo.js to maintain the list of donors and allow adding, updating, and deleting donors. The donor object has donorID, firstName, lastName, and email properties. This module should implement the following functions: • getDonor(donorId): returns a donor by id. • addDonor(donor): adds a donor to the list of donors; donorID should be autoassigned a random number. • updateDonor(donor): updates the donor having the matching donorID. • deleteDonor(donorID): delete the donor with donorID from the list of donors, only if they are not associated with any books. 2. The app should have books-repo.js to maintain the list of donated books and allow adding, updating, and deleting books. The book object has bookID, title, authors, and donorID properties. • donorID references the book’s donor. This…Java ProgramEdit this program that when you press the clear button, it actually clears the textfield and data of the previous numbers pressed.import java.awt.BorderLayout;import java.awt.Container;import java.awt.Dimension;import java.awt.GridLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.util.ArrayList;import javax.swing.*;public class Pincode extends JPanel implements ActionListener {JLabel display, displayExtra;JButton numButton;JButton clr;JButton etr;String displayContent = "";String[] numPadContent = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "CLEAR", "0", "ENTER"};ArrayList<JButton> buttonList;String PASSWORD = "061904";JFrame f;Pincode(Container pane) {pane.setPreferredSize(new Dimension(320, 335));display = new JLabel(displayContent);displayExtra = new JLabel(displayContent);display.setPreferredSize(new Dimension(320, 25));display.setBorder(BorderFactory.createLoweredBevelBorder());pane.add(display,…(In java please) ( NO TOY CLASS PLEASE READ INSTRUCTION OR DOWN VOTE PLEASE LOOK AT TWO IMAGES BELOW FIRST ONE IS CURRENCY CLASS NEED THE SECOND IS INSTRUCTIONS ON HOW TO MAKE TEST CLASS. PLEASE NO TOY CLASS OR DOWN VOTE USE CURRENCY CLASS INSTEAD AND UPDATE IT) THIS A LinkNode structure or class which will have two attributes - a data attribute, and a pointer attribute to the next node. The data attribute of the LinkNode should be a reference/pointer of the Currency class of Lab 2. Do not make it an inner class or member structure to the SinglyLinkedList class of #2 below. A SinglyLinkedList class which will be composed of three attributes - a count attribute, a LinkNode pointer/reference attribute named as and pointing to the start of the list and a LinkNode pointer/reference attribute named as and pointing to the end of the list. Since this is a class, make sure all these attributes are private. The class and attribute names for the node and linked list are the words in bold in #1…
- class Vector3D:def __init__(self, x, y, z):# TODO: Create a routine that saves the vector# <x, y, z> into this Vector3D object.passdef __add__(self, other):# TODO: Create a routine that adds this vector with Vector3D other# and returns the result as a Vector3D objectreturn None def __neg__(self):# TODO: Create a routine that returns the negative (opposite) of# this vector as a Vector3D object return None def __sub__(self, other):# TODO: Create a routine that subtracts this vector with Vector3D other# and returns the result as a Vector3D objectreturn None def __mul__(self, other):# TODO: Create a routine that multiplies this vector with other# depending on its data type, and returns the result as a# Vector3D object. other can either be an integer# scalar or a Vector3D object. return None def main():testcases = int(input()) for t in range(testcases):line_in = input().split()op = line_in[0].strip()vec_vals = [int(x) for x in line_in[1:]] # TODO: a Write routine that processes a line…Define the Circle2DYourLastName class that contains: Two double data fields names x and y that specify the center of the circle withgetter methods. A double data field radius with getter method. A constructor that creates a circle with specified x, y, and radius. A method findTypeOfIntersection to determine and return types ofintersection as string (contained, overlap, or separate).Simple Student Management System Build the following app using Python Tkinter library. Using this app, user can • add student information • view all students • search student(s) by name • remove student by id Add • First name, last name, date of birth cannot be blank while adding a specific student information. • However major can be blank, which gets set to "Undefined" if left out blank. • Student Id is automatically generated by the program (ex: 1001, 1002, 1003, 1004 ….) If the user keeps a mandatory field blank (ex: First name) and presses "Add Student" button, it displays the following message box: first name is required If the user successfully enters all the necessary information and presses the "Add Student" button, it displays the following confirmation message box: student added View All When the user presses the "View All" button, it displays all the student’s information (Id, First name, Last name, Date of birth, and Major) in a nice formatted way. Example below: • Must…