You are to write a boarding system for a Cruise ship in java. The system will print a menu with which the user will interact to assign passengers to each cabin of a cruise ship. Task 1. Arrays solution. Designa program for a Cruise Ship with twelve cabins using code like th code provided nearthe end of your notes. Start by checking that the code works.
Q: Explain the GSM architecture and mention the roles for each components?
A: GSM network is an digital mobile telephony system which is being used all around the world for the…
Q: Please answer it in Python Write a function min_odd that takes a list as an argument and returns…
A: The python codes are given below
Q: Consider the following graph and find the minimum cost of this problem by using Prim's algorithm and…
A:
Q: In the following code snippet, where comments indicate line numbers: uint64_t x = 2; uint64_t y = 5;…
A:
Q: verage 1 ment to see how many scores you need to include. (Keep ½. Create the chart for the…
A: Answer is in given below:-
Q: Why are acknowledgments present in 802.11 but not in wired Ethernet?
A: Let us see the details below.
Q: What is the meaning of Datatype in Python? Please provide at least two examples
A: Introduction Datatype Data type is used to represent particular data. Data types are classes whereas…
Q: List the nine major components of a typical database environment.
A: Introduction: A typical database setup consists of a number of critical components. There are nine…
Q: apa = { "A":4.0, "A-":3.7, "B+":3.3, "B":3.0, "B-":2.7, "C+":2.3, "C":2.0, "C-":1.7, "D+":1.3,…
A: Gpa is a dictionary so for getting the equivalent of given key you have use get method and pass the…
Q: How to proceed the data in each excel entry box into separate txt files and upload them to the SAS…
A: NOTE :- Below i explain the answer in my own words by which you understand it well. More often…
Q: Total = a + b + c; %3. Average Total / 6; A. Logic Errors B. Run-time Errors
A: Introduction We have the following code : Total = a + b + c; Average = Total / 6; Given Options:…
Q: Buffers are used to minimise access latency between various levels of the memory hierarchy. List the…
A: Introduction: A designated memory section within a program for storing the data being processed.…
Q: What exactly is dynamic memory, and how does it vary from ordinary memory?
A: Intro Computer Memory: Memories are used to store information on computers, and in computer…
Q: Create table "STUDENT" with attributes "STUDENT_ID", "STUDENT_NAME", "STUDENT GPA". Use appropriate…
A: NOTE : There is a policy from bartleby to solve only first 3 subparts of a question.
Q: The chef gives you an A sequence of N's length. Let X mean MEX for A sequence. The cook is…
A: Process of the code: Firstly we will take the value of number of test cases t Then we will call…
Q: How are truly distributed systems modeled?
A: A distributed system uses resources from different system located on multiple networks. Distributed…
Q: What exactly is Open Database Connectivity (ODbc)?
A: Introduction: Open Database Connectivity (ODBC) is a database access interface that is defined by…
Q: What are the modifications necessary for upgrading GSM to GPRS? Explain it with proper diagram.…
A: What are the modifications necessary for upgrading GSM to GPRS? Explain it with proper diagram.…
Q: What exactly is a poison packet attack, and how does it work? Give two examples of this type of…
A: Introduction: Poison packet assaults are the most prevalent kind of attack in which attackers…
Q: Is it true that one of the key principles of continuous delivery, Ajail, contradicts the software's…
A: Introduction: The quality of the software is one of the fundamental concepts of continuous delivery,…
Q: What would be the output of the following code? KWLinkedList list = new KWLinkedList (); for(int i =…
A: KWLinkedList<Integer> list = new KWLinkedList<Integer>(); for(int i=0; i<4; i++)…
Q: What are the many types of networking?
A: Introduction What are the many types of networking?
Q: Which of these is a MAC Address? A. 9C-35-5B-5F-4C-D7-IC-00 B. 00:0C:29:IC:BC:6B C. 0912 491 1234…
A: Let us see the answer:-
Q: 1. What is the command to use to run commands as root but you're logged in as a non-root account?
A: Linux: Linux is a group of open-source Unix-like operating systems based on the Linux kernel'.…
Q: Code in Prolog. Do not use in built libraries. Implement the following relation to find the maximum…
A: Input : The list of values. Output : Maximum value from the list.
Q: Describe the difference between an access network and an information network
A: An access network is a user network which connects subscribers to a particular service provider and…
Q: Write a program that first gets a list of integers from input. The input begins with an integer…
A: def ints_less_than_or_equal_to_threshold(user_values, upper_threshold): new_array = [] for…
Q: How are the untrusted network, the firewall, and the trustworthy network normally connected?
A: Introduction: While the Internet or another portion of a public access network is frequently used as…
Q: Write a Java code which display the following results using nested for. 1 12 123 1234 12345
A: Below the java code with output
Q: Get the time complexity of each of the following: 1) for (int i = 1; i <=n; i += c) { for…
A: As per our guidelines, we are supposed to answer only one question. Kindly repost the remaining…
Q: What is the main role of an ER diagram in data modelling? How many courses each student can have?…
A: What is the main role of an ER diagram in data modeling? An entity-relationship diagram, or ER…
Q: named boston pass. This program will tell the user whether they passed a course or not. Please read…
A: I have written the code below:
Q: Why may RISC device characteristics be useful, particularly in CISC systems? Based on the distinct…
A: Introduction: The following aspects of RISC systems may be explicitly employed in CISC systems:
Q: What happens to data in a buffer when it is not used?
A: Intro Data buffer: A data buffer (or simply buffer) is a memory space used to temporarily hold data…
Q: What are the benefits of utilising exception handling?
A: Introduction In computing and computer programming, exception handling is the process of answering…
Q: Computer science Short answer In Artificial Intelligence, talk about the Expert System.
A: Introduction: Artificial intelligence (AI) is the capacity of a computer or a robot controlled by a…
Q: Which of the following is a feature of Power Query?
A: Solution - In the given question, we have to find the correct answer among the given options.
Q: In a two-dimensional array, the rows are stored in memory randomly regardless of the order. Select…
A:
Q: Explain what the term "salt" means in the context of cryptography. You should go through how it is…
A: Introduction: People who have the same password utilise the salt. For the attack, the salt password…
Q: Consider the following weighted digraph, then fill up its adjacency matrix and also draw its…
A: Given: Given the following weighted diagraph , then fill up its adjacency matrix and also draw…
Q: What exactly are system development methods? Examine the significance of system development…
A: Introduction: The system development methods: these are the fundamental methods that are used to…
Q: Write a C program that will do the following: • Create an integer type 2D array with the number of…
A: The two-dimensional array can be defined as an array of arrays.
Q: Explain the difference between analog and digital computer
A: An Analog computer system is a computer system that uses continuously changeable physical entities…
Q: Explain the communication between the following system components and their connecting ports or…
A: CPU, RAM, ROM, Northbridge, Southbridge, HDD and graphic card are the hardware components of the…
Q: In java program. Please show the output of the program and run.
A: Answer is given below-
Q: What exactly is an IMSI, where may it be found, and what is it used for? How would a digital…
A: Introduction: The IMSI, wherever it may reside and whatever it is utilised for, is employed by…
Q: What exactly is the function of a database?
A: Introduction: The database's objective is to aid in the organisation of your company and the…
Q: Q1// write a program in C++, to create a class for calculate the volume of two boxes using class and…
A: The solution to the given problem is below.
Q: When you invoke a method on an object instance, the version of the method that will be executed will…
A: Find the answer with explanation given as below :
Q: 1, Which description about Information Theoretic Security is NOT correct?
A: The correct answer for given question with explanation is given below
do both tasks
Step by step
Solved in 3 steps with 1 images
- (Electrical eng.) Write a program that declares three one-dimensional arrays named volts, current, and resistance. Each array should be declared in main() and be capable of holding 10 double-precision numbers. The numbers to store in current are 10.62, 14.89, 13.21, 16.55, 18.62, 9.47, 6.58, 18.32, 12.15, and 3.98. The numbers to store in resistance are 4, 8.5, 6, 7.35, 9, 15.3, 3, 5.4, 2.9, and 4.8. Your program should pass these three arrays to a function named calc_volts(), which should calculate elements in the volts array as the product of the corresponding elements in the current and resistance arrays (for example ,volts[1]=current[1]resistance[1]). After calc_volts() has passed values to the volts array, the values in the array should be displayed from inside main().Part 1: In Java Write a program that uses a 2-D array to store the highest and lowest temperatures for each month of the year. The program should output the average high, average low, and highest and lowest temperatures of the year. Your program must consist of the following methods with their appropriate parameters: a.) getData: This method reads and stores the data in the 2-D array. b.) averageHigh: This method calculates and returns the average high temperature of the year. c.) averageLow: This method calculates and returns the average low temperature of the year. d.) indexHighTemp: This method returns the index of the highest temperature in the array. e.) indexLowTemp: This method returns the index of the lowest temperature in the array. Use the following input: High temp for each month: 30 40 45 60 70 90 89 95 79 90 70 40 Low temp for each month: 10 -10 20 30 50 75 85 79 50 80 30 20JAVA Your teacher has created two arrays, each holding the results of tests, say Test 1 and Test 2. You need to create a new array which holds the averages of these two tests. You may assume that the first element of the first test array refers to the student who also has the grade in the first element of the second test, and the last element in each array are the grades the last student earned for each test. All students received grades for both tests, meaning both test arrays are of the same length. Complete the method, named makeAverage, in the class named Grades.java. There are two parameters to this method: the first is the integer array representing the grades of the first test, and the second is the array containing the grades of the second test. The new average array should be returned by the method. The grades should be treated as double variables. For example, consider the test grades for the five students in the following arrays: [ 87 ] [ 91 ] [ 76 ] [ 76 ] [ 94 ]…
- Problem1: 2D Arrays write a java code to Create a 3x3 2D array, fill it with numbers from the user, and check if the array is an hour glass shape or not.Can help in java String [] names = {"Dimo Ivanov", "Yani Yanev", "Ana Popova", "Nelly Angelova"}; 1. Display the array in the console using the Arrays.toString () method 2. Display the names and the number of characters in the name (without the space) as a table (use printf) Name Number of lettersDimo Ivanov 10 3. Get an array first_letters of type char [], containing the first letters of the names. Display it with Arrays.toString () 4. Get the arrays of names and surnames containing initial and second names, respectively (first determine the position of the space in the previous name with the indexOf () method of the String class). Display the arrays. 5. Sort the first_names arrayJAVA Create an application that contains an enumeration (enum) that represents the days of the week. Display a list of the days, then prompt the user for a day. Display business hours for the chosen day. Create your own business hours stored in an array; however, every day of the week should have different hours. Although companies do not normally have different business hours every day of the week, programming your code with this difference will help in finding and fixing coding errors.
- In Java Assignment 5B : Maze Game! 2D Arrays can be used to store and represent informationabout video game levels or boards. In this exercise, you will use this knowledge tocreate an interactive game where players attempt to move through a maze. You willstart by creating a pre-defined 2D array with the following values:{"_","X","_","X","X"}{"_","X","_","X","W"}{"_","_","_","X","_"}{"X","X","_","_","_"}{"_","_","_","X","X"}You will then set the player (represented by “O”) at index 0, 0 of the array, the top-leftcorner of the maze. You will use a loop to repeatedly prompt the user to enter adirection (“Left”, “Right”, “Up”, or “Down”). Based on these directions, you will try tomove the player.• If the location is valid (represented by “_”), you will move the player there• If the location is out of bounds (e.g. index 0, -1) or the command is invalid, youwill inform the player and prompt them to enter another direction• If the location is a wall (represented by “X”), you will tell the…In C Programming Language Palindrome: “A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward, such as ‘madam’ or ‘kayak’” (excerpt from Wikipedia).Write a program that reads 8 words from Palindrome.txt and checks whether the word you read is a palindrome (please read its description above) or not. Print the index numbers of all the palindrome words in your array. You are required to read words character by character into a character array.• Write readFile function, which gets a file pointer and a two-dim array, to read each word(bunch of characters) line by line and store them into a two-dim character array.• Write findSize function takes a one-dim array and returns its actual size.• Write isPalindrome function takes a one-dim character array to check whether the content is a polindrome or not. If the word (character squence) is a palindrome, then it returns 1. Otherwise, it returns 0.5.Array _7 .Two-Dimensional ArrayInstruction:Create a java program that generates elements (randomly from 10 – 75) of a 2-dimensional array (5x5) using the Random Class then perform the following:1) Output the array elements2) Output the sum of prime numbers in the array3) Output the elements in the main diagonal.4) Output the sum of the elements below the diagonal.5) Output the sum of the elements above the diagonal.6) Output the odd numbers below the diagonal.7) Output the even numbers above the diagonal. NOTE: Please do not use the array methods available on the internet. Use .
- 1. Create an java program containing an array that stores 20 prices, such as $2.34, $7.89, $1.34, and so on. The application should -display the sum of all the prices, -display all values less than $5.00, -calculate the average of the prices, and -display all values that are higher than the calculated average value.This program is written in java. 2D arrays (matrices/grids) Write a program that takes 20 student objects and stores them in an array. Each Student object should have a first name and a last name. Sort the array by student’s last name. You can use any of the sorts you have. Then put the names into a 2D array that has 5 rows and 4 columns. Create and print 2 seating charts by printing the 2D array, formatted as shown below. Student 17 Student 18 Student 19 Student 20 Student 13 Student 14 Student 15 Student 16 Student 9 Student 10 Student 11 Student 12 Student 5 Student 6 Student 7 Student 8 Student 1 Student 2 Student 3 Student 4 second chart should look randomized, like this. Student 4 Student 8 Student 12 Student 16 Student 20 Student 3 Student 7 Student 11 Student 15 Student 19 Student 2 Student 6 Student 10 Student 14 Student 18 Student 1 Student 5 Student 9 Student…Two-Dimensional ArrayInstruction:Create a java program that generates elements (randomly from 10 – 75) of a 2-dimensional array (5x5) using the Random Class then perform the following:1) Output the array elements2) Output the sum of prime numbers in the array3) Output the elements in the main diagonal.4) Output the sum of the elements below the diagonal.5) Output the sum of the elements above the diagonal.6) Output the odd numbers below the diagonal.7) Output the even numbers above the diagonal. NOTE: Please do not use the array methods available on the internet. Use the for loop, while loop or do-while loop statement in your codes.