Description
I have the following code, for the assignment attached done. All I need is for someone to sort it into a zip folder to make it work in eclipse. I am having a hard time making it work in eclipse.
Unformatted Attachment Preview
/*** JAVA PROGRAM THAT SIMULATES THE PREPROCESSOR *****/
import java.util.Stack;
import java.util.*;
import java.io.*;
class Preprocessor
{
public static boolean balance_Chek(String inStr12)
{
Stack s_st1 = new Stack();
for(int k1 = 0; k1 < inStr12.length(); k1++)
{
char let = inStr12.charAt(k1);
if(let == '[' || let == '{' || let == '('||let=='/')
{
switch(let)
{
// FORSQUARE BRACKET
case '[':
s_st1.push(let);
break;
// FOR CURLY BRACE
case '{':
s_st1.push(let);
break;
// FOR BRACKETS
case '(':
s_st1.push(let);;
break;
//FOR COMMANDS
case '/':
char t=inStr12.charAt(k1+1);
if(t=='*')
s_st1.push(let);
break;
default:
break;
}
}
else if(let == ']' || let == '}' || let == ')'||let=='*')
{
if(s_st1.empty())
return false;
switch(let)
{
// FORSQUARE BRACKET
case ']':
if (s_st1.pop() != '[')
return false;
break;
// FOR CURLY BRACE
case '}':
if (s_st1.pop() != '{')
return false;
break;
// FOR BRACKETS
case ')':
if (s_st1.pop() != '(')
return false;
break;
//FOR COMMANDS
case '*':
if(inStr12.charAt(k1+1)=='/')
if (s_st1.pop() != '/')
return false;
break;
default:
break;
}
}
}
if(s_st1.empty())//CHECK STACK IS EMPTY
return true;
return false;
}//EMD METHOD
}
//TEST CLASS
public class MyPreprocessor
{
//MAIN METHOD
public static void main (String [] args)
{
//FileReader AND BuffeRedreader TO READ FROM FILE
FileReader fk=new FileReader("tet.txt");
BufferedReader bk=newBufferedReader(fk);
Preprocessor p;
String preLine;
//READING FROM FILE
while((preLine=br.readLine())!=null)
{
//DISPLAY THE STRING AS WELL AS CHECK ITS BALANCED DELIMITERS
System.out.println("Line is: "+preLine +" is
Balanced?"+balance_Chek(preLine));
}
}
}
Purchase answer to see full attachment
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.
Explanation & Answer
Review
Review
Anonymous
Great! Studypool always delivers quality work.
Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Most Popular Content
How to give people remote access?
Michael Scott has asked for a detailed plan on how to give people remote access. He wants a briefing in his office next we ...
How to give people remote access?
Michael Scott has asked for a detailed plan on how to give people remote access. He wants a briefing in his office next week.oPost your work as a PowerPoint document to Moodle. Minimize text, use pictures/diagrams where appropriate. Please be detailed last time the tutor wasnt happy with the level of info.
Please answer the following questions using the command line.
Please answers all questions using the command line. And provide screenshots with the answer. Attatched are the questions ...
Please answer the following questions using the command line.
Please answers all questions using the command line. And provide screenshots with the answer. Attatched are the questions /task you must peform. The link to the lab is http://figmosecurity-staging.herokuapp.com/hq/hyperskillThe screenshots should should describe each step that is being performed i have attatched an sample answer
CSE 3302 North Lake College Python Programming Coding Task
Do NOT plagiarize. No group work. All work should be your own. Do not discuss your work with other students in the class. ...
CSE 3302 North Lake College Python Programming Coding Task
Do NOT plagiarize. No group work. All work should be your own. Do not discuss your work with other students in the class. You CANNOT borrow code from online sources.Use Python to create a simple calculator that accepts Reverse Polish Notation (RPN) and displays the final answer (Intermediate steps or results need not be displayed). It only accepts 4 operators “+”, “-“, “*”, “/”. Input numbers will be single digits. The input will be in postfix notation. The input will be provided in a text file called input_RPN.txt. Your program should not ask the user for any input. There will be one RPN expression in each line. Your code should be able to read the file and print the result for each RPN in a new line. Example of RPN: 4 2 + and your output should be 6. This is a simple expression. More complex algebraic notations will be used to test your program like the one below. Example algebraic notation: ( 4 + 2 * 5 ) / ( 1 + 3 * 2 ) Translated into RPN: 4 2 5 * + 1 3 2 * + / Note: - Your code should be able to read the input file from the same folder (which has your .py file). Do not hard code the path to the file in your laptop/desktop. Use os to get the path and read the input file. Also, please take special care to process the line-ending character correctly; for example, if you write the program on a Mac it should work correctly when graded using Windows and vice versa. Extra credit (5 points each) Write a separate program that can input an algebraic expression and convert it to RPN and then evaluate the RPN. Print the RPN and the result in separate lines. If you are implementing extra credit, your file should be name as <netid>_EC.py. The input file name will be input_RPN_EC.txt and it will have algebraic expressions.Add more operators (unary subtraction, or modulo division, etc.). You must document what operators you are adding. Add which ones to comments and make sure to include that as well in your submission so the GTA knows to test using the extra scenarios.
CSCI 312 Davenport University Huffman Encoding Algorithm Program
I need help with the detailed instructions in bold below. I have attached the visual studio program code in word documents ...
CSCI 312 Davenport University Huffman Encoding Algorithm Program
I need help with the detailed instructions in bold below. I have attached the visual studio program code in word documents, it was the only I could get them to attach correctly. I need all of the questions below Deliverable answered for a multiple part project. Design and implement a program that will compress and uncompress an ASCII text file using the Huffman encoding algorithm of your own design. The use of third party compression algorithms, APIs, or services is prohibited. The program must either function from the command line or provide a graphical user interface.) Please answer the question in bold that is listed below. Deliverable A single ZIP file that contains the following: • A single detailed design document including the methodology, data structures, file structures, and algorithms used to design and code the program • A reproducible testing plan that encompasses the compress and decompression operations, the input data, and the steps used to validate the results • The source code • Detailed instructions on how to use the program
ITC 4010 Columbia Southern University Context Diagram and a Diagram 0 DFD HW
Instructions As a systems analyst, you have been tasked by your program manager to create a context diagram and a Diagr ...
ITC 4010 Columbia Southern University Context Diagram and a Diagram 0 DFD HW
Instructions As a systems analyst, you have been tasked by your program manager to create a context diagram and a Diagram 0 DFD for the typical library function of checking and returning books, as well as updating the user list. You have been told to use the Yourdon symbols DFD to create your diagrams. You must: Draw and label a context diagram for the typical library function of checking and returning books, as well as updating the user list. Then write the description process, provide the data dictionary, and include the structured English for the diagram.Draw and label a Diagram 0 DFD for the typical library function of checking and returning books, as well as updating the user list. Then write the description process, provide the data dictionary, and include the structured English for the diagram. Below is the additional information that you will need to create the context diagram and the Diagram 0 DFD. Context Diagram – Library Function Model Manage books.Add and remove books.Checkout and return books.Archive checkout list and user list.Update user. Diagram 0 DFD Add and remove books.Checkout and return books.Archive checkout list and user list. Submit your assignment as a .doc, .docx, .pdf, .jpg, or .odt format. Because you are using the Yourdon Symbol DFD, this can easily be created by MS Word, PaintShop Pro, or other favorite drawing software.
ITEC 2080 Walden University Week 6 User Data Validation Paper
Assignment: Share Your Travel Photos—User Data Validation In this Application, you will use the web page created in the ...
ITEC 2080 Walden University Week 6 User Data Validation Paper
Assignment: Share Your Travel Photos—User Data Validation In this Application, you will use the web page created in the Unit 4 Project assignment and supplement it with JavaScript validation of data being submitted to the server for further processing. The page contains the web form with a variety of HTML controls, each accepting certain type of data. Indeed, you want a data submission to be complete and meaningful—otherwise what is the purpose to send missing or incorrect user’s data at all? This approach shifts validation tasks form usually busy server to the client. That results in less network traffic and produces quicker response to a user. Validity checking of form data is often performed on the server as well, but any errors that can be detected and corrected on the client might save server and network time substantially. Making use of JavaScript DOM and events you will create data validation JavaScript codes which will be processing the page data prior to submission data to the server. Your final Unit 6 Project page should work in such a way that if missing or invalid data is detected, then no submission will occur, and a user will get a message with information what specific data is missing or incorrect, the control background color of the control being validated will be changed to yellow, and a user will be asked to reenter valid data and then attempt the submission again. In this assignment, you will be creating a set of custom JavaScript functions, each validating a specific data input component on the web page. When the “Submit Query” button is clicked, each component validation function should be called, one after another. The message shown to a user when a validation function fails should be specific referencing the control which has not passed data validation. You are writing these validation functions yourself; the use of standard prebuilt JavaScript validator controls is not allowed. Bonus: When finished with the custom validation of existing form controls implemented with your own code, you are welcome to explore a use of Regular Expressions to validate, e.g., an email address. Add one more textbox, E-mail to the form, and use Regular Expression to validate the user’s input is match an email format. Similarly, you can add and validate a phone number field (accept the USA local phone number format). Perform the following steps: Download the template files Unit6Project_template.zip and unzip it.In the unzipped project folder replace Unit6Project_template.html and Unit6Project_template.css with your own final Unit 4 Project solution files (you will need to adjust the references to .css files as now they will be located in the CSS folder).Be sure that your Unit6Project_template page looks exactly as the final solution in the Unit 4 assignment:
Similar Content
CSE 274 MU BinaryTree Implementation and Algorithms Java Eclipse Project
follow the instruction in the pdf to finish this lab ...
Numeric Integration with OpenMP Reduction Project
CS 475/575 Project #2
1 of 5
https://web.engr.oregonstate.edu/~mjb/cs575/Projects/...
CS 475/575 -- Spring Quarter 2022...
Tidewater Community College C Programming IPO Chart Program
1.
The principal of a local school wants a program that displays the average number of students per teacher at the school....
What type of application the data structure should be used for each of Java data structures listed?, homework help
Questions must be answered like an job interview questions and in own words. Please read the full document for the full qu...
Java Gui Program, programming homework help
Please use jGrasp. Thanks ...
Executive Summary: Policy, programming homework help
Documents attached...
Lab4
bad_chars = ['.', ',', ':', '-', '"', '?', '!', '(', '[', ';', '{', "'"]...
Training Memo
Subject: IMPLEMENTATION OF A TRAINING PROGRAM IN THE ORGANIZATION I propose the need for a training program that will ensu...
1
public SavingsAccount(String name,double balance,double rate) throws //by current interest rate divided by 12 and then add...
Related Tags
Book Guides
2001 A Space Odyssey
by Arthur Clarke
The Power of Habit - Why We Do What We Do in Life and Business
by Charles Duhigg
The 5 Love Languages
by Gary Chapman
The Joy Luck Club
by Amy Tan
Dr Jekyll And Mr Hyde
by Robert Louis Stevenson
Hiroshima
by John Hersey
Where'd You Go Bernadette
by Maria Semple
The Secret Garden
by Frances Hodgson Burnett
The Elegant Universe
by Brian Greene
Get 24/7
Homework help
Our tutors provide high quality explanations & answers.
Post question
Most Popular Content
How to give people remote access?
Michael Scott has asked for a detailed plan on how to give people remote access. He wants a briefing in his office next we ...
How to give people remote access?
Michael Scott has asked for a detailed plan on how to give people remote access. He wants a briefing in his office next week.oPost your work as a PowerPoint document to Moodle. Minimize text, use pictures/diagrams where appropriate. Please be detailed last time the tutor wasnt happy with the level of info.
Please answer the following questions using the command line.
Please answers all questions using the command line. And provide screenshots with the answer. Attatched are the questions ...
Please answer the following questions using the command line.
Please answers all questions using the command line. And provide screenshots with the answer. Attatched are the questions /task you must peform. The link to the lab is http://figmosecurity-staging.herokuapp.com/hq/hyperskillThe screenshots should should describe each step that is being performed i have attatched an sample answer
CSE 3302 North Lake College Python Programming Coding Task
Do NOT plagiarize. No group work. All work should be your own. Do not discuss your work with other students in the class. ...
CSE 3302 North Lake College Python Programming Coding Task
Do NOT plagiarize. No group work. All work should be your own. Do not discuss your work with other students in the class. You CANNOT borrow code from online sources.Use Python to create a simple calculator that accepts Reverse Polish Notation (RPN) and displays the final answer (Intermediate steps or results need not be displayed). It only accepts 4 operators “+”, “-“, “*”, “/”. Input numbers will be single digits. The input will be in postfix notation. The input will be provided in a text file called input_RPN.txt. Your program should not ask the user for any input. There will be one RPN expression in each line. Your code should be able to read the file and print the result for each RPN in a new line. Example of RPN: 4 2 + and your output should be 6. This is a simple expression. More complex algebraic notations will be used to test your program like the one below. Example algebraic notation: ( 4 + 2 * 5 ) / ( 1 + 3 * 2 ) Translated into RPN: 4 2 5 * + 1 3 2 * + / Note: - Your code should be able to read the input file from the same folder (which has your .py file). Do not hard code the path to the file in your laptop/desktop. Use os to get the path and read the input file. Also, please take special care to process the line-ending character correctly; for example, if you write the program on a Mac it should work correctly when graded using Windows and vice versa. Extra credit (5 points each) Write a separate program that can input an algebraic expression and convert it to RPN and then evaluate the RPN. Print the RPN and the result in separate lines. If you are implementing extra credit, your file should be name as <netid>_EC.py. The input file name will be input_RPN_EC.txt and it will have algebraic expressions.Add more operators (unary subtraction, or modulo division, etc.). You must document what operators you are adding. Add which ones to comments and make sure to include that as well in your submission so the GTA knows to test using the extra scenarios.
CSCI 312 Davenport University Huffman Encoding Algorithm Program
I need help with the detailed instructions in bold below. I have attached the visual studio program code in word documents ...
CSCI 312 Davenport University Huffman Encoding Algorithm Program
I need help with the detailed instructions in bold below. I have attached the visual studio program code in word documents, it was the only I could get them to attach correctly. I need all of the questions below Deliverable answered for a multiple part project. Design and implement a program that will compress and uncompress an ASCII text file using the Huffman encoding algorithm of your own design. The use of third party compression algorithms, APIs, or services is prohibited. The program must either function from the command line or provide a graphical user interface.) Please answer the question in bold that is listed below. Deliverable A single ZIP file that contains the following: • A single detailed design document including the methodology, data structures, file structures, and algorithms used to design and code the program • A reproducible testing plan that encompasses the compress and decompression operations, the input data, and the steps used to validate the results • The source code • Detailed instructions on how to use the program
ITC 4010 Columbia Southern University Context Diagram and a Diagram 0 DFD HW
Instructions As a systems analyst, you have been tasked by your program manager to create a context diagram and a Diagr ...
ITC 4010 Columbia Southern University Context Diagram and a Diagram 0 DFD HW
Instructions As a systems analyst, you have been tasked by your program manager to create a context diagram and a Diagram 0 DFD for the typical library function of checking and returning books, as well as updating the user list. You have been told to use the Yourdon symbols DFD to create your diagrams. You must: Draw and label a context diagram for the typical library function of checking and returning books, as well as updating the user list. Then write the description process, provide the data dictionary, and include the structured English for the diagram.Draw and label a Diagram 0 DFD for the typical library function of checking and returning books, as well as updating the user list. Then write the description process, provide the data dictionary, and include the structured English for the diagram. Below is the additional information that you will need to create the context diagram and the Diagram 0 DFD. Context Diagram – Library Function Model Manage books.Add and remove books.Checkout and return books.Archive checkout list and user list.Update user. Diagram 0 DFD Add and remove books.Checkout and return books.Archive checkout list and user list. Submit your assignment as a .doc, .docx, .pdf, .jpg, or .odt format. Because you are using the Yourdon Symbol DFD, this can easily be created by MS Word, PaintShop Pro, or other favorite drawing software.
ITEC 2080 Walden University Week 6 User Data Validation Paper
Assignment: Share Your Travel Photos—User Data Validation In this Application, you will use the web page created in the ...
ITEC 2080 Walden University Week 6 User Data Validation Paper
Assignment: Share Your Travel Photos—User Data Validation In this Application, you will use the web page created in the Unit 4 Project assignment and supplement it with JavaScript validation of data being submitted to the server for further processing. The page contains the web form with a variety of HTML controls, each accepting certain type of data. Indeed, you want a data submission to be complete and meaningful—otherwise what is the purpose to send missing or incorrect user’s data at all? This approach shifts validation tasks form usually busy server to the client. That results in less network traffic and produces quicker response to a user. Validity checking of form data is often performed on the server as well, but any errors that can be detected and corrected on the client might save server and network time substantially. Making use of JavaScript DOM and events you will create data validation JavaScript codes which will be processing the page data prior to submission data to the server. Your final Unit 6 Project page should work in such a way that if missing or invalid data is detected, then no submission will occur, and a user will get a message with information what specific data is missing or incorrect, the control background color of the control being validated will be changed to yellow, and a user will be asked to reenter valid data and then attempt the submission again. In this assignment, you will be creating a set of custom JavaScript functions, each validating a specific data input component on the web page. When the “Submit Query” button is clicked, each component validation function should be called, one after another. The message shown to a user when a validation function fails should be specific referencing the control which has not passed data validation. You are writing these validation functions yourself; the use of standard prebuilt JavaScript validator controls is not allowed. Bonus: When finished with the custom validation of existing form controls implemented with your own code, you are welcome to explore a use of Regular Expressions to validate, e.g., an email address. Add one more textbox, E-mail to the form, and use Regular Expression to validate the user’s input is match an email format. Similarly, you can add and validate a phone number field (accept the USA local phone number format). Perform the following steps: Download the template files Unit6Project_template.zip and unzip it.In the unzipped project folder replace Unit6Project_template.html and Unit6Project_template.css with your own final Unit 4 Project solution files (you will need to adjust the references to .css files as now they will be located in the CSS folder).Be sure that your Unit6Project_template page looks exactly as the final solution in the Unit 4 assignment:
Earn money selling
your Study Documents