Write a program to read and store four student's car number and their distances, sort them into an order name, based on distances from the near to the far, then print them out. The student's car number and the distances values should be typed in by the user in response to a prompt message. Save the file as SortName_yourlD.java
Q: In java, please read the text file as array. Then, replace the null with 0 and calculate the sum of…
A: Q: In java, please read the text file as array. Then, replace the null with 0 and calculate the sum…
Q: write a program that will open a file called “story.txt” and count the number of occurrences of each…
A: EXPLANATION: Used system call fopen,we have opened the file "file1.txt"in read mode System call…
Q: Write a program that uses 3 command line arguments to search a list of float numbers in a file and…
A: Step 1 : Start Step 2 : Create a method SearchFile which takes the file name and the float value to…
Q: Write a program that processes orders for our company Widgets and More. Your program will read the…
A: A required C++ program is as follows, //Include header files #include <iostream>…
Q: Write a program that uses the sizeof operator to determine the sizes in bytes of the various data…
A: Given that we have to make a program that has to print the size of datatype on screen and save that…
Q: Write a program to read and store four student’s car number and their distances, sort them into an…
A: Answer: For this problem, a class Student with instance variables id, car number and distance is…
Q: studentNumber (int), courseCode (char array [8]), finalGrade (float). 200201078 CENG104 89.75…
A: Declare an integer variable to store user input for options from 0 to 6. Declare variables to hold…
Q: Hello ! Would look whats wrong with my program. When I add a contact the others names which they are…
A: To find: When I add a contact the names of the others which are in the Txt file be deleted and I…
Q: Consider the following dataset that shows total runs of a set of players in different cricket…
A: Algorithm: Start Initialize the names of cricket players in a 1d array named 'names' Initialize…
Q: Write a program, which writes the even elements of an integer array to a file called…
A: Start Declare an array with values. Find the size of the array. for (i=0 : n ) do if(arr[i]%2==0) do…
Q: Write a program that will read in a file of student academic credit data and create a list of…
A: The Java program is written where it takes the input student file and add the GPA function to the…
Q: Write a program that asks the user to enter an amount of money in the format of dollars and…
A: Program: # Asking for a dollar and cent amount from the user # Prompting a message to enter a amount…
Q: Write a program using the random number generator to create a list of random rainfall measurements…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Using JAVA Your client owns a bookstore, and they need to process an input file containing the…
A: Programming instructions: Include necessary header files. Create a class. In the class, Create a…
Q: BY JAVA Write a program to read and store four student’s id number and their grade, sort them into…
A: import java.util.Scanner;class Student{ String id; float grade;}public class SortID_yourID{…
Q: Read the file containing integer values and add these values to the list. ArrayList • For…
A: Create the file with the intergers. In the main method create the arraylist of the integers. Then…
Q: This program asks the user to enter 4 names for a team, storing them in an array of Strings.
A: 1. Create function input Team with parameter int array size. i. create array of string of…
Q: Write a program to read and store four student's name and their Salaries, sort them into an order…
A: ALGORITHM:- 1. Take input from the user. 2. Create a data structure class to store person details…
Q: In the main() method, create four arrays: String[] tokensFromFile1;…
A: Create a method: public static void calculateCorrelation(int[][] correlation, String[]…
Q: Write a program to read and store four student's 21SP registered course and their grade point, sort…
A: The complete code is given below.
Q: Write a program to read and store four student’s car number and their distances, sort them into an…
A: JAVA code to copy: import java.util.*; public class SortName_yourID { public static void…
Q: In this assignment you will write a program to find the mean of a list of grades stored in a file.…
A: We have to create a program which reads the data of the text file named "john_smith_grades.txt" and…
Q: I have a text file that have a list of employee's Id and name correspond to it. All the IDs are…
A: According to the asked question, the solution is given below with a proper explanation.
Q: Write a program for the following problem. You're given a file that contains a collection of IDs and…
A: Answer:)
Q: Write a program to read and store four student's 21SP registered course and their grade point, sort…
A: Given that Write a program to read and store four student's 21SP registered course and their grade…
Q: We will put the data into a file n_bikes.txt, one number per line, and will post it in this…
A: def main(): # Open mynumbers.txt for reading i=0 a=[] sum=0 myfile =…
Q: Write a python program to read salary of n employee ,employee name and salary as keyboard input,…
A: file = open("salary.txt","w+") n = int(input("Enter the value of n: ")) # Inputting the value of nm…
Q: Write a program to read and store four student's name and their CGPA, sort them into an order name,…
A: Source Code: import java.util.Scanner; public class SortName_yourID { public static void…
Q: Write a program where the user enters 10 floating point numbers into an array and it shows the…
A: Program Approach: Including a necessary header file Declaring the main method Declare an array of…
Q: In java program, please find out the total population for United Kingdom with data that store in…
A: This program is written in Java. Here the file is reading line by line and splitting each line based…
Q: Would look whats wrong with my program. When I add a contact the others names which they are in the…
A: The problem in your code is that, you have to open file in write mode therefore, when you add a…
Q: The history teacher at your school needs help in grading a True/False test. The students’ IDs and…
A: The, code has given below:
Q: Display the first name and salary*10000 of all employees who works for department 50. Handle…
A: declarecursor c isselect first_name, last_name, department_idfrom employeeswhere to_char(hire_date,…
Q: In java, use while (!StdIn.isEmpty()) to read in a file of strings with 3 letter words. put these…
A: import java.util.Scanner; public class ThreeLetterStrings { /** * @param args the order line…
Q: Write a program to read and store four number student's car and their distances, sort them into an…
A: import java.util.*; public class SortName_yourID { public static void main(String args[]) {…
Q: For this exercise, assume that the user will correctly enter ID numbers and zip codes, but force…
A: Given: Program named CreateItemFile.java that creates a file of items carried by the company.…
Q: Write a program called Words that: prints your name followed by three asterisks; reads the words in…
A: Note: Answering the first three subparts as per the guidelines. Input : Name Output : Show name…
Q: For this assignment, you will write a Python program that uses a file named scores.txt to store sets…
A: Answer : def main(): with open("scores.txt", "a") as file: while True:…
Q: File sourceFolder, String filename
A: Answer: Note: Done accordingly. Please comment for any problem. Please Uprate. Thanks Code: package…
Q: The name should be able to be sorted last name first. Profession should be able to be sorted…
A: q: The name should be able to be sorted last name first. Profession should be able to be sorted…
Q: Write a program called FiveLetterWords that: prints your name followed by three asterisks; reads…
A: Required Python Code provided below :
Q: Write a program to accomplish the following: One of your professors has asked you to write a program…
A: The code is given below in the C++ language :
Q: In the program below for decomposing the entered number into its prime numbers, the location of the…
A: The correct answer is given below with an explanation
Q: Java Write an application that allows a user to enter the names and birthdates of up to 10 friends.…
A: Write an application that allows a user to enter the names and birthdates of up to 10 friends.…
Q: Write a program to read and store four student's 21SP registered course and their grade point, sort…
A: The Complete code is given below.
Q: Write a program to read and store four student’s id number and their grade, sort them into an order…
A: import java.util.Scanner;//importing scanner import java.util.*;import java.lang.*;public class…
Q: Create a program that read the file "data_bmi.txt" 1 180 86 2 176 68.8 3 184 74 4 158 46 169 65.3…
A: Formula to calculate the BMI value of a person given height and weight as input values is as follows…
Q: dent data that consists of a Student number, First name, Surname, and average assignment mark.…
A: Write a Java application that allows a user to enter student data that consists of a Student…
Step by step
Solved in 2 steps
- Write a program to read and store four student’s id number and their grade, sort them into an order their id, based on grades from the smallest to the largest, then print them out. The student’s id number and their grade values should be typed in by the user in response to a prompt message. Save the file as SortID_yourID.javaWrite a program to read and store four student’s car number and their distances, sort them into an order name, based on distances from the near to the far, then print them out. The student’s car number and the distances values should be typed in by the user in response to a prompt message. Save the file as SortName_yourID.javaWrite a program to read and store four student's 21SP registered course and their grade point, sort them into an order their 21SP registered course, based on grade point from the smallest to the largest, then print them student's 21SP registered course and their grade point values Should be typed in by the user in response to a prompt Save out. The file message as SortCourse_2019293081.java
- Write a program to read and store four student's 21SP registered course and their grade point, sort them into an order their 21SP registered course, based on grade point from the smallest to the largest, then print them out. The student's 21SP registered course and their grade point values should be typed in by the user in response to a prompt message. Save the file as SortCourse_yourlD.javaThe Apgar Medical group keeps a patient file for each doctor in the office. Each record contains the patient's first and last name, home address, and birth year. The records are sorted in ascending birth year order. Write a program so that display a count of the number of patients born each year John Hanson, 23 Elm, 1927Mary Locust, 476 Maple, 1950Susan Monroe, 512 Peachtree, 1957Carol Fortune, 2819 Locust, 1960James Fortune, 2819 Locust, 1963Lawrence Fish, 12 Elm, 1968Janice Weiss, 234 Birch, 1971Henry Garza, 199 Second, 1973Kimberly Swanson, 310 Appletree, 1980Louis Claude, 2716 Third, 1981Jill Fox, 12 Oak, 1985Opal Reynolds, 78 County Line, 1987Francis Dumas, 67 Fourth, 1992Madison Conroy, 23 Fifth, 1996Daniel Moy, 100 Sunset, 1987QUESTION 1 Write a program to read and store four student's name and their Salaries, sort them into an order name, based on Salaries from the smallest to the largest, then print them out. The student's name and their Salary values should be typed in by the user in response to a prompt message. Save the file as SortName_yourlD.java Attach File Browse My Computer
- Write a program to read and store four student’s name and their Salaries, sort them into an order name, based on Salaries from the smallest to the largest, then print them out. The student’s name and their Salary values should be typed in by the user in response to a prompt message. Save the file as SortName_yourID.javaFinish this program from the code posted below! Note: There should be two files Main.py and Contact.py You will implement the edit_contact function. In the function, do the following: Ask the user to enter the name of the contact they want to edit. If the contact exists, in a loop, give them the following choices Remove one of the phone numbers from that Contact. Add a phone number to that Contact. Change that Contact's email address. Change that Contact's name (if they do this, you will have to remove the key/value pair from the dictionary and re-add it, since the key is the contact’s name. Use the dictionary's pop method for this!) Stop editing the Contact Once the user is finished making changes to the Contact, the function should return. Code:from Contact import Contactimport pickledef load_contacts():""" Unpickle the data on mydata.dat and save it to a dictionaryReturn an empty dictionary if the file doesn't exist """try:with open("mydata.dat", 'rb') as file:return…QUESTION 1 Write a program to read and store four student’s 21SP registered course and their grade point, sort them into an order their 21SP registered course, based on grade point from the smallest to the largest, then print them out. The student’s 21SP registered course and their grade point values should be typed in by the user in response to a prompt message. Save the file as SortCourse_yourID.java
- The names and student numbers of students are save in a text file called stnumbers.txt. Example of the content of the text file: Peterson 20570856 Johnson 12345678 Suku 87654321 Westley 12345678 Venter 87654321 Mokoena 79012400 Makubela 29813360 Botha 30489059 Bradley 30350069 Manana 30530679 Shabalala 28863496 Smith 87873909 Nilsson 30989698 Makwela 30256607 Govender 30048117 Ntumba 30598303 Ramsamy 29952239 Skosana 29982995 Jameson 30228484 Xulu 29092248 Wasserman 27469352 Bester 28615425 Babane 27154033 Maboya 29897890 Mahlangu 30031338 Majavu 30165970 Myene 30954177 Motaung 30907276 Ramaroka 30804507 Radebe 30007674 Sekake 30017416 Zwane 30038227 Shuro 30238072 Viljoen 28881389 Sithole 45688555 Write a function called displayData() to receive the array and number of elements as parameters and display the names and student numbers of the students with a heading and neatly spaced. Write a function, isValid(), which receives a number as parameter and determines whether the number…File names: color_square.py, chessboard.py, test_squares.py Positions on a chess board are identified by a letter and a number. The letter identifies the column; the number identifies the row. See the image below. You will provide the functions that allow us to determine: if a chessboard square is either black or white, given its coordinates. If the row/column is valid or not for the standard chessboard For example, if we pass in “d” for the column and 4 for the row, your function that determines color should return the string: “BLACK”. If we pass in "k" for the column to your function that validates columns, that function should return the boolean False. Requirements: Your function for validating the column should be able to accept upper or lowercase strings as parameters. Your functions for validating the row should be able to accept integers or strings as parameters. Your function that determines black-or-white may assume that the input has been validated prior to us calling…Cargo Container Report. You will be producing a program which will allow the user to generate the container report on the following page in Container Number order or Ship Name order. The program will also the user to lookup the data for any given Container by number. The % cargo weight is the percentage of the cargo of the gross weight (cargo weight/gross weight), % total is the percentage of the cargo for that container of the total amount of cargo unloaded (cargo weight for the container / total cargo unloaded. Hint: you are expected to use methods for your calculations. The accompanying file has the data for the containers unloaded today. The data includes container number int ship name. String tare weight of the container (empty weight) int the gross weight (container plus the cargo). Int You will need to computer the cargo weight as the gross weight minus the tare weight. If you have issues reading the data with the String, you may remove the String. However, you will lose points.…