The popularity ranking of baby names over the last 100 years (1920-2019) is downloaded from http://www.ssa.gov/oact/babynames/decades/century.html and stored in the file named "babynameranking.txt". Each line contains a ranking, a boy's name, number for the boy's name, a girl's name, and number for the girl's name. For example, the first two lines in the file "babynameranking.txt" are as follows: 1 James 4,735,694 3,265,105 Mary Patricia Jennifer John 4,502,387 4,499,901 1,560,897 1,467,664 3 Robert So, the boy's name James and girl's name Mary are ranked #1 and the boy's name John and girl's name Patricia are ranked #2. 4,735,694 boys are named James and 3,265,105 girls are named Mary. Write a program that prompts the user to enter the gender and followed by a name, and displays the ranking of the name.
Q: When using the 7th option, you should create a personnel using their name and surname. When using…
A: Code is given in next steps:
Q: You have a list of student ID’s followed by the course number (separated by a space) that the…
A: import java.util.ArrayList; import java.util.HashMap; import java.util.Scanner; public class Main{…
Q: Subtract each element in origList with the corresponding value in offsetAmount. Print each…
A: The answr is given below:-
Q: theater seating chart is implemented as a two-dimensional array of ticket prices, Like this 10 10 10…
A: Solution Programming Approach Import necessary package create main class create scanner class…
Q: An archery target consists of a central circle of yellow surrounded by con-centric rings of red,…
A: Lets see the solution.
Q: Use Arrays to create a Java Program that takes in from the user the grades of a student (until…
A: The program is below implemented in java:
Q: for my python class I am to write a program to modify immages. the image format being used is a PPM.…
A: class PPM(object): def __init__(self, infile, outfile): self.infile=infile…
Q: Write a program that has an array of at least 10 string objects that hold people’s names and phone…
A: #include<iostream>#include<string>#include<cctype>using namespace std; #define…
Q: In this programming challenge, you will create a simple trivia game for two players. The program…
A: Given The answer is given below.
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: In the class Student, create a method for each of the following results using the array concept and…
A: Summary: Java supports object-oriented programming. The class student is declared and a 2d array is…
Q: Initialize a variable for the row, and set it to zero. Then, create a for loop from 0 to the total…
A: public static int[] oneMonthGenerator(double longitute, double latitude, int month, double[][]…
Q: File Welcome to OOPII_PizzaMania Each Topping: $150 Pizza Size Pizza Type O Tomato O small: $25.00…
A:
Q: For this part in the assignment, you need to write a program in python that removes all instances of…
A: Solution for given question - Python program for the provided problem statement # this function…
Q: Html/javascript!!!!!! First, create a deck of cards. Now, write test code that shows you can sort…
A: here, first, we have to create a deck of cards. then we have to write test code that shows that we…
Q: Create an ArrayList of strings to store the names of celebrities or athletes. Add five names to the…
A: Following is the java program that defines an arrayList of type string. Add() method is used to add…
Q: Create a game similar to Hangman named GuessAWord in which a player guesses letters to try to…
A: Short Summary: Implemented a windows forms application named “GuessAWord” using C# You can modify…
Q: For the supplied code, produce a sales report that shows customers, products, prices, total price…
A: The code is as follows.............................. // Here we are importing the necessary…
Q: Write an activity that takes the list of hours and then returns the total weekly wage. Listing hours…
A: Write an activity that takes the list of hours and then returns the total weekly wage. Listing hours…
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: Doctor signature:String doctorID:int medicine:Arraylist Doctor(signature:String,doctorID:int)…
A: This UML is implemented in java using object-oriented programming. Since there is no language…
Q: mat {name, weight, expiryDate}, write a function that prints the sum of the weights whose expiryDate…
A: Given an array of objects with format {name, weight, expiryDate}, write a function that prints the…
Q: Here you are required to draw a bar chart of batchwise strength of Avionics Department with…
A: import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots() Batch =…
Q: Exercise 2. (Pascal's Triangle) Pascal's triangle Pn is a triangular array with n+1l rows, each…
A: Coded using Python 3.
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: Create an ArrayList, Named it Husnain that can hold Integers, and fill each slot with a different…
A: By specifying the number n, we can generate the random number from 0 to n-1 So, add 1 to this, and…
Q: Use the Active Code window below to create 4 parallel arrays and intialize them using initialization…
A: Answer is given below .
Q: convert this code to JAVA location = [] size = [] rover = 0 def displayInitialList(location,…
A: Dear Student,There were details missing in the code like The methods allocateMemory() and…
Q: A teacher has five students who have taken four tests. The teacher uses the following grading scale…
A: #include <iostream> using namespace std; int main(){ string names[5];char…
Q: read a csv file and put each row into an array, if a user inputs number '1' it will retrieve the…
A: import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import…
Q: Submission Instructions Follow the instructions for How to Submit Programming Assignments.…
A: Following is the java program which takes as input string of integers from command line and save it…
Q: The Grades.java class file has a studentScores array with 6 elements. Add a loop that will Check…
A: Please find the answer below :
Q: JAVA LANGUAGE Create an ArrayList, Name it YourRegNoandName that can hold Integers, and fill each…
A: import java.util.*;import java.lang.*;import java.util.Scanner;public class main{ public static…
Q: File Welcome to OOPII PizzaMania Each Topping: $150 Pizza Size Pizza Type Tomato O Small: $25.00 O…
A: The java code is
Q: File Welcome to OOPII_PizzaMania Each Topping: $150 Pizza Size Pizza Type Tomato O Small: $25.00 O…
A: According to the information given:- We have to create a pizza ordering program.
Q: You have to use comment function to describe what each line does import java.io.BufferedReader;…
A: Hey there, I am writing the required solution based on the above given question. Please do find the…
Q: Write a program that do the following: Ask the user to input his/her first name and store it in a…
A: import java.util.*; class TestClass { public static void main(String args[] ) throws Exception {…
Q: Write a program in C++ programming language that: I. records the basic information of a patient…
A: #include <iostream>using namespace std;//method to conver Fahrenheit to celsiusvoid…
Q: two ArrayLists: list1=[10,20,30], and list2=[40,50], what is the content of the list1 after…
A: two ArrayLists: list1=[10,20,30], and list2=[40,50], what is the content of the list1 after…
Q: Create an ArrayList of strings to store the names of celebrities or athletes. Add five names to the…
A: Following is the java program: Approach: An ArrayList(sting type) is defined. Names of…
Q: Java Create an ArrayList of strings to store the names of celebrities or athletes. Add five names…
A: I have added the comments. I have also added the screenshot of the output for better understanding.…
Q: Create an action that takes the planet as an argument and returns its escape speed expressed in m/…
A: Algorithm - Define all the given constants. create a method with planet argument. now create a…
Q: Doctor -signature:String -doctorID:int - medicine:Arraylist +Doctor(signature:String,doctorID:int)…
A: This UML is implemented in java using object oriented programming. Since there is no language…
Q: Results are not the same at the end and I do not get the right result after choosing number 3. The…
A: While entering the record for the student, the buffer for the input requires to be cleared. It can…
Q: Which of the above choices (A, B, C or D) prints the name of each animal in the animalList object…
A: For printing all the names from the given list of animals we need to iterate over each index of the…
Q: For example, suppose the word “robot” is found in lines 7, 18, 94, and 138. The dictionary would…
A: Program screenshot:
Q: A class with 10 students will take 3 exams. Use 3 arrays to hold the scores for each student and…
A: Since you are not mentioning the programming language, here we are using Java to complete the…
Q: The Grades.java class file has a studentScores array with 6 elements. Add a loop that will Check…
A: Please find the answer below :
JAVA
I need help making this java code, here is the link that is within the question http://www.ssa.gov/oact/babynames/decades/century.html
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 3 images
- Suppose you have a file Monster.txt that lists the Monster Energy Drinks the company offers, on one line and the price for a case of 24, with the customer ratings on a scale of 1-5 on the second line. The following shows the first few lines of the file: Monster Energy Nitro Super Dry Maximum Strength Drink 39.99 4.5 Monster Energy Ultra Red, Sugar Free Energy Drink 39.99 5 Red Bull Energy Drink, Zero 92.23 4.5 Red Bull Energy Drink, Coconut Berry 41.18 5 Monster Energy Juice, Pipeline Punch 34.98 5 Red Bull Energy Drink, Coconut Berry 41.18 5 The first line means the drink name is: Monster Energy Nitro Super Dry Maximum Strength and the second line means that a case of 24 cost $39.99 and it was rated 4.5/5. NOTE: WE DO NOT KNOW HOW MANY LINES THERE ARE IN THE FILE. Write the C++ program (with comments) that reads the data from the file, lists only those drinks rated 5 stars, and indicates if the five star drink comes with a free six pack or not.The customer gets a free six…The code given below represents a saveTransaction() method which is used to save data to a database from the Java program. Given the classes in the image as well as an image of the screen which will call the function, modify the given code so that it loops through the items again, this time as it loops through you are to insert the data into the salesdetails table, note that the SalesNumber from the AUTO-INCREMENT field from above is to be inserted here with each record being placed into the salesdetails table. Finally, as you loop through the items the product table must be update because as products are sold the onhand field in the products table must be updated. When multiple tables are to be updated with related data, you should wrap it into a DMBS transaction. The schema for the database is also depicted. public class PosDAO { private Connection connection; public PosDAO(Connection connection) { this.connection = connection; } public void…In Java: The CSV (or comma-separated values) format is commonly used for tabular data. Each table row is a line, with columns separated by commas. Items may be enclosed in quotation marks, and they must be if they contain commas or quotation marks. Quotation marks inside quoted fields are doubled. Here is a line with four fields:1729, San Francisco, "Hello, World", "He asked: ""Quo vadis?""" Implement a class CSVReader that reads a CSV file, and provide methodsint numberOfRows()int numberOfFields(int row)String field(int row, int column)
- The following sample file called grades.txt contains grades for several students in an imaginary class. Each line of this file stores a student's name followed by their exam scores. The number of scores might be different for each student. abdul 10 15 20 30 40erica 23 16 19 22haroon 8 22 17 14 32 17 24 21 2 9 11 17omar 12 28 21 45 26 10chengjie 14 32 25 16 89alex 15 22 11 35 36 7 9bryan 34 56 11 29 6laxman 24 23 9 45 27 Now, consider the following code. f = open("grades.txt", "r") for aline in f: items = aline.split() # choose your option for this part f.close() Which option prints out only the names of each student in stored in grades.txt? Question 11 options: print(items[0:]) print(items[0]) print(items[0][0])The following sample file called grades.txt contains grades for several students in an imaginary class. Each line of this file stores a student's name followed by their exam scores. The number of scores might be different for each student. abdul 10 15 20 30 40erica 23 16 19 22haroon 8 22 17 14 32 17 24 21 2 9 11 17omar 12 28 21 45 26 10chengjie 14 32 25 16 89alex 15 22 11 35 36 7 9bryan 34 56 11 29 6laxman 24 23 9 45 27 Now, consider the following code. f = open("grades.txt", "r") for aline in f: items = aline.split() # choose your option for this part f.close() 1. Which option prints out the names of students that have more than six scores stored in grades.txt? a. if len(items[1:]) == 6: print(items[0]) b. if len(items[:]) > 6: print(items[0]) c. if len(items[1:]) > 6: print(items[0]) 2. Which option prints out only the names of each student in stored in grades.txt? a.…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…
- Implement the CertOfDepositArrayapplication to accept data for an array of five CertOfDeposit objects, and then display the data. The program should prompt the user for the following information (in order): Certificate # Last name Balance Month of issue Day of issue Year of issue The program should display the year the certificate matures, which is one year after it was issued, in the format YYYY-MM-DD. the first file looks like this import java.time.*; public class CertOfDeposit { privateString certNum; privateString lastName; privatedouble balance; privateLocalDate issueDate; privateLocalDate maturityDate; publicCertOfDeposit(Stringnum,Stringname,doublebal,LocalDateissue) { } publicvoidsetCertNum(Stringn) { } publicvoidsetName(Stringname) { } publicvoidsetBalance(doublebal) { } publicvoidissueDate(LocalDatedate) { } publicStringgetCertNum() { } publicStringgetName() { } publicdoublegetBalance() { } publicLocalDategetIssueDate() { } publicLocalDategetMaturityDate() { } } and the…In this project, you will develop algorithms that find road routes through the bridges to travel between islands. The input is a text file containing data about the given map. Each file begins with the number of rows and columns in the map considered as maximum latitudes and maximum longitudes respectively on the map. The character "X" in the file represents the water that means if a cell contains "X" then the traveler is not allowed to occupy that cell as this car is not drivable on water. The character "0" in the file represents the road connected island. That means if a cell contains "0" then the traveler is allowed to occupy that cell as this car can drive on roads. The traveler starts at the island located at latitude = 0 and longitude = 0 (i.e., (0,0)) in the upper left corner, and the goal is to drive to the island located at (MaxLattitude-1, MaxLongitudes-1) in the lower right corner. A legal move from an island is to move left, right, up, or down to an immediately adjacent…In this project, you will develop algorithms that find road routes through the bridges to travel between islands. The input is a text file containing data about the given map. Each file begins with the number of rows and columns in the map considered as maximum latitudes and maximum longitudes respectively on the map. The character "X" in the file represents the water that means if a cell contains "X" then the traveler is not allowed to occupy that cell as this car is not drivable on water. The character "0" in the file represents the road connected island. That means if a cell contains "0" then the traveler is allowed to occupy that cell as this car can drive on roads. The traveler starts at the island located at latitude = 0 and longitude = 0 (i.e., (0,0)) in the upper left corner, and the goal is to drive to the island located at (MaxLattitude-1, MaxLongitudes-1) in the lower right corner. A legal move from an island is to move left, right, up, or down to an immediately adjacent…
- write a python code named get_total_cases() takes the a 2D-list (similar to database) and an integer x from this set {0, 1, 2} as input parameters. Here, 0 represents Case_Reported_Date, 1 represents Age_Group and 2 represents Client_Gender (these are the fields on the header row, the integer value represents the index of each of these fields on that row). This function computes the total number of reported cases for each instance of x in the text file, and it stores this information in a dictionary in this form {an_instance_of_x : total_case}. Finally, it returns the dictionary and the total number of all reported cases saved in this dictionary. (Suppose we want to know the total number of cases reported on each date, so use x = 0.) >>> result, total_cases = get_total_cases(database, 0) >>> display_dict(result) 2021-05-19: 8 2021-05-20: 2 2021-05-21: 1 2021-05-22: 1 >>> print(total_cases)Java : Create a .txt file with 3 rows of various movies data of your choice in the following table format: Movie ID number of viewers rating release year Movie name 0000012211 174 8.4 2017 "Star Wars: The Last Jedi" 0000122110 369 7.9 2017 "Thor: Ragnarok" 1. Create a class Movie which instantiates variables corresponds to the table columns. Implement getters, setters, constructors and toString. 2. Implement 2 readData() methods : the first one will return an array of Movies and the second one will return a List of movies . 3. Implement two search methods to search Movies by their rating from unsorted array and by year (first) and a rating (second) from unsorted List.4. Implement two MovieComparators to compare movies by their rating from unsorted array and by year (first) and a rating (second) from unsorted List.For this part in the assignment, you need to write a program in python that removes allinstances of a target element in a file named inputFile.txt. The user must enter the instance thatyou need to remove from that file. Once you received that instance, you need to check all thecontent in the inputFile.txt and remove that word. The result will be saved in another file calledoutputFile.txt. For example, if you received that the user wants to remove the word “and”, youneed to identify all the matches and remove them in the outputFile.txt document.Requirements: You should create the content in the inputFile.txt, please make them at leastwith ten lines or more. You could include poems, lyrics, news, etc. It is up to you. Also, youmust use functions to solve this part in the assignment