JAVA code
Q: In Python Prompt the user for a text file that contains a list of student names, one on each line.…
A: NOTE: Follow proper indentation. sample data not given in the question. so, random data considered…
Q: Java OOP Write a complete address book maintenance application. The user of the program has four…
A: 1. Import necessary libraries (e.g., Scanner, ArrayList).2. Define a Person class with attributes…
Q: File Factorials.java contains a program that calls the factorial method of the MathUtils class to…
A: Factorial of a number Factorial of a number is define as the product of all the numbers starting…
Q: Create a file in your project named employees.txt with the following data (you can simply create the…
A: Algorithm:Create a function named lookup_employee that takes an employee ID as a parameter.Inside…
Q: Please Modify this program ASAP BECAUSE IT IS HOMEWORK ASSIGNMENT so it passes all the test cases.…
A: The steps :Take input of the file name.Till the user does not enter quit, run an infinite loopIf the…
Q: I need help with a java problem: Write a program that reads the student information from a tab…
A: Initialize Variables:Declare variables for the file name, arrays for student information (lastNames,…
Q: Write a method named classPresidents that tallies votes for presidents of two school classes.…
A: The program is written in Java. Check the program screenshot for the correct indentation. Please…
Q: UOB student is expecting to graduate if his/her GPA is greater than or equal to 2.0 and he/she is in…
A: Answer:
Q: 3. Factorials/MathUtils File Factorials.java contains a program that calls the factorial method of…
A: ote: Could you plz go through this code and let me know if u need any changes in this.Thank…
Q: The file “dna.seq” (on Blackboard) consists of several DNA sequences. Write a program that reads in…
A: The goal is to create a Python program that performs several tasks on these sequences, including…
Q: Java Programming: Below is the lexer, shank and token files along with the shank.txt file. The shank…
A: Here is the corrected code for Lexer.java:
Q: Please Modify this program ASAP BECAUSE IT IS MY MIDTERM so it passes all the test cases. It does…
A: SOLUTION -In this code, we have some of the wrong outputs.We have to correct the while loop and some…
Q: you should create a program that takes a file name as an argument, and prints the hex dump of it.…
A: This is complete code that takes a file name as an argument and prints the hex dump of it.
Q: lease code in javas, thank you Write a program that opens the salesdat.txt file and processes it…
A: Coded using Java language.
Q: PHONE DIRECTORY Description: Create a phonebook directory that will store the contact numbers of…
A: А teleрhоne direсtоry, соmmоnly саlled а teleрhоne bооk, teleрhоne аddress bооk, рhоne…
Q: JAVA PPROGRAM ASAP Hypergrade does not like this program because it says 2 out of 7 passed and…
A: Program Initialization:Begin by setting up the program.User Input Handling:Create an input scanner…
Q: Objective: Design and implement a word unscrambler game in Java. Details: Your program should read…
A: Given data, We need to design and implement a word unscrambler game in Java. The program should read…
Q: Challenge 2: InvalidNumbers.java Write a program InvalidNumbers that asks the user to enter a…
A: Java is the object oriented programming languages.Java which it is a high-level, class-based,…
Q: Create methods "read" and "write" methods to handle the input and output to files. in Java
A: import java.io.FileWriter; import java.io.IOException;import java.io.File; import…
Q: he program will read and store the bad words(Kill,killer,assault,etc.) from the file. Then, it will…
A: code : ProfanityChecker.java import java.io.BufferedReader;import java.io.File;import…
Q: Problem: Write a program that takes position and current salary value from the user and calculate…
A: Java Program: import java.util.*; class Salary { public static void main(String[] args) {…
Q: Create a list of 5 words, phrases and company names commonly found in phishing messages. Assign a…
A: Introduction Java Class: A class is a fundamental building piece in object-oriented programming. It…
Q: > - Challenge 7 File encryption is the science of writing the contents of a file in a secret code.…
A: Algorithm for File Encryption (Challenge 7):Open the input file ("input.txt") for reading and the…
Q: In Java I need to design an ESP Game: Design a program to test your extrasensory perception. The…
A: Hi check below for the ESP Game source, flow chart and class diagram
Q: ## This function is used to generate the input file Directory.txt 2 ## Run this cell to gererate the…
A: Writting the code in python :
I have the following contents in my JSON file:
[{"firstName":"John","middleName":"Lewis","lastName":"Arsadon","username":"JArsadon","password":"1234"}]
Please give me a JAVA code that will allow the user to login if they input a username and password that matches with the values on the file.
Step by step
Solved in 2 steps
- JAVAWrite a program that will add and remove the following name and phone number list. (List on image below) Once lists of names and phone numbers are added to the program, the program will ask a user whether there is an item to be removed or not. If it is, it will be removed. Otherwise, the program is terminated. The program will delete items continuously if requested. The result of the program looks like following:Java Programming: Below is the lexer, shank and token files along with the shank.txt file. The shank file is the main method file. The lexer must break up the input text stream into lexemes and return a token object for each one in the shank.txt file. Make sure to fix the errors in the lexer.java file and show the complete code for lexer.java.There must be no error in the code at all. Run the whole code and show the output which the shank.txt must be printed out in the terminal. Attached is the rubric. Lexer.java package mypack; import java.util.HashMap;import java.util.List;import mypack.Token.TokenType; public class Lexer { private static final int INTEGER_STATE = 1;private static final int DECIMAL_STATE = 2;private static final int IDENTIFIER_STATE = 3;private static final int SYMBOL_STATE = 4;private static final int ERROR_STATE = 5;private static final int STRING_STATE = 6;private static final int CHAR_STATE = 7;private static final int COMMENT_STATE = 8; private static final…Create a list of 5 words, phrases and company names commonly found in phishing messages. Assign a point value to each based on your estimate of its likelihood to be in a phishing message (e.g., one point if it's something likely, two points if modereratly, or three points if highly likely). Write an application that scans a file of text for these terms and phrases. For each occurance of a keyword or phrase within the text file, add the assigned point value to the total points for the number of occurences and the point total. Show the point total for the entire message. (Write the program in Java)
- <<Write in Java>> - Challenge 7 File encryption is the science of writing the contents of a file in a secret code. Your encryption program should work like a filter, reading the contents of one file, modifying the data into a code, and then writing the coded contents out to a second file. The second file will be a version of the first file, but written in a secret code. Although there are complex encryption techniques, you should come up with a simple one of your own. For example, you could read the first file one character at a time, and add 10 to the character code of each character before it is written to the second file. - Challenge 8 Write a program that decrypts the file produced by the program in Programming Challenge 7. The decryption program should read the contents of the coded file, restore the data to its original state, and write it to another fileJava OOP Write a complete address book maintenance application. The user of the program has four options: Add a new person, delete a person, modify the data of a person, and search for a person by giving the name. Use the AddressBook class, either the original one from the chapter or the modified one from the previous exercises. You have to decide how to allow the user to enter the values for a new person, display person information, and so forth.Please do in Java In many computer systems and networks,different users are granted different levels of access to different resources. In this case, you are given a int[] rights, indicating the privilege level of each user to use some system resource. You are also given a int minPermission, which is the minimum permission a user must have to use this resource. You are to return a String indicating which users can and cannot access this resource. Each character in the return value corresponds to the element of users with the same index. 'A' indicates the user is allowed access, while 'D' indicates the user is denied access. Constraints users will contain between 0 and 50 elements, inclusive. Each element of users will be between 0 and 100, inclusive. minPermission will be between 0 and 100, inclusive. Examples a) {0,1,2,3,4,5} 2 Returns: "DDAAAA" Here, the first two users don't have sufficient privileges, but the remainder do. b) {5,3,2,10,0} 20 Returns: "DDDDD"…
- JAVA PPROGRAM Please Modify this program with further modifications as listed below: ALSO, take out and change the following in the program: System.out.println("Program terminated."); because the test case does not need it And change this in the program: Please enter the file name or type QUIT to exit:\n so it reperats once for every test case because it repeats twice in every case as shown in the screenshot. I only need it once. I have provided the failed the test cases and the inputs as a screenshot. The program must pass the test case when uploaded to Hypergrade. import java.io.*;import java.util.ArrayList;import java.util.Scanner;public class SymmetricalNameMatcher { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String fileName; do { // Prompt the user to enter a file name or 'QUIT' to exit. System.out.print("Please enter the file name or type QUIT to exit:\n"); fileName =…Create a file in your project named employees.txt with the following data (you can simply create the file by hand rather than with Python code): 123 Bob Smith345 Anne Jones256 Carol Lee845 Steve Robert Anderson132 Jill Thompson From your program's main function, give the user the following options: lookup a name based on ID number, lookup an ID number based on name, and quit the program. OPTION 1: The user chooses to lookup a name based on ID number: Use a try/except and ask the user to enter an integer. If they don't enter an integer, print an error message. If they do enter an integer, call a function named lookup_employee which takes the id as a parameter. If an employee with the given id number is found, return the name. Otherwise, return the string “Employee not found” Back in main, print the return result. OPTION 2: The user chooses to lookup an ID based on name: Ask the user to enter the first and last name (don't ask for the middle name). Call a function named…Create methods "read" and "write" methods to handle the input and output to files. in Java
- I needed the FiveOnly program in Java just like the Programming Challenge #13 in the Starting Out With Java (7th Edition) textbook. It was part of Chapter 4. Thank you so much!java programming language note: this is only one questionWrite a program that writes 100 integers created randomly into a file. Integers are separatedby a space in the file. Read the data back from the file and display the sorted data. Yourprogram should prompt the user to enter a file- name. If the file already exists, do not overrideit.