$marks = array( "Sara" => array( "Programming" => 95, "DataBase" => 85, "Web" => 74, ), "Diana" => array( "Programming" => 78, "DataBase" => 98, "Web" => 66, ), "Amy" => array( "Programming" => 88, "DataBase" => 76, "Web" => 99, ), ); 1 : sort the array by the name
Q: Most statically typed languages developed since the 1970s (including Java, C#, and the descendants o...
A: The concept of name equivalence is more of an abstract type. While programming it allows the user to...
Q: Are both variables p1 and p2 pointers if p1 and p2 are defined as follows: double* p1, p2;
A: A pointer is a variable whose value is the address of another variable, i.e., direct address of the ...
Q: Show the printout of the following code: double x = 3.5;double* p1 = &x;double y = 4.5;double* p...
A: Given code isThis initializes the value of x.double x = 3.5The address of x is stored in pldouble* p...
Q: In what situation should you overload the = operator?
A: Given: In what situation should you overload the = operator?
Q: (Formal logic) Predicate Translation Not everything is without meaning. (Mx: x is meaningful) On...
A: 1. (Ǝx)(C(x)^D(x)) -> P(x) 2. ~C(x) -> G(x) 3. (Ǝx)(C(x)) -> ~G(x)
Q: 18. The TTL gate network in Figure 15-57 is incomplete. Indicate the changes that should be made. A ...
A: Given:
Q: Explain why it is not necessary for a program to be completely free of defects before it is delivere...
A: Testing is a procedure for ensuring that a programme does as it is supposed to do and for identifyin...
Q: Give two examples of languages that lack a Boolean type. What do they use instead?
A: languages that lack a Boolean type : - 1) C Programing 2) C++ programming 3) C# programming
Q: (PYTHON) The following pattern is called 5-triangle * ** *** **** ***** Create a recursive program t...
A: function n_triangle(n): Start for x= 1 to n follow step 3 to 5 for y= 1 to x follow step 4 print("...
Q: What is a recursive function? Describe the characteristics of recursive functions. What is an infini...
A: Function that invokes itself is defined as a recursive function. A recursive function is also known ...
Q: What is the event for clicking the left mouse button twice?
A: Given: What is the event for clicking the left mouse button twice?
Q: Coding from EdSim51 Simulator? sw0---> Led0-led3=On led4-led7=OFF sw1---> Led0-led3=OFF led4-l...
A: #include <reg51.h> sbit DB7 = P1^7; sbit DB6 = P1^6; sbit DB5 = P1^5; sbit DB4 = P1^4; sbit R...
Q: The questions in this group refer to the following three relations: SALESPERSON (Name, Age, Salary) ...
A: As per our company guidelines, we are supposed to answer only three subparts of a post and kindly re...
Q: How do you open a file for binary I/O?
A: Given: How do you open a file for binary I/O?
Q: How do you declare and open a file for output? How do you declare and open a file for input?
A: The basic steps for using a File are: Create a variable of type "FILE*". Open file by the use of "...
Q: The most common ADC seen in telecommunications based on audio signals is(a) flash ADC(b) successive ...
A: Given: The most common ADC seen in telecommunications based on audio signals is(a) flash ADC(b) succ...
Q: In C language, take an Infix expression from the user and convert to a Postfix expression using Stac...
A: An infix expression can be converted to a postfix expression with the help of a stack. The steps inv...
Q: Assume you declared int* p, and p’s current value is 100. What is p + 1?
A: Given: Assume you declared int* p, and p’s current value is 100. What is p + 1?
Q: Compare and contrast exceptions and interrupts.
A: Compare and contrast exceptions and interrupts
Q: Based on your understanding which of the following statements describes the vulnerable transmission ...
A: Based on your understanding which of the following statements describes the vulnerable transmission ...
Q: Question 1: You are requested to develop a simple java program, to solve the following ...
A: Use different arrays to store the items and price of each item Then, print the bill along with total...
Q: What distinguishes operators from other sorts of functions?
A: Given: What distinguishes operators from other sorts of functions?
Q: Why is it impossible to catch all uses of uninitialized variables at compile time?
A: Uninitialized variable: Uninitialized variable are those variables that are declared but is not set...
Q: Research the type systems of Standard ML, OCaml, Haskell, and F#. What are the principal differences...
A: OCaml : OCaml formerly known as Objective Caml . OCaml is a general-purpose, multi-...
Q: Consider the phone number field in the registration form of Ibri hospital's Web application. Based o...
A: Actually, given information. Consider the phone number field in the registration form of Ibri hospit...
Q: What is upcasting? What is downcasting?
A: Given; What is upcasting? What is downcasting?
Q: What is an l-value?An r-value?
A: L-value: L-value: “l-value” refers to memory location which identifies an object. l-value may appear...
Q: What is a recursive helper function?
A: . In a program, recursion occurs when a function is called by itself, repeatedly. . This recursive c...
Q: Write a query code of html for registration form in sublime text software when building a web applic...
A: this is the registeration form which allows user to enter first name,last name,email id,contact numb...
Q: How do you define a new type named doublePointer that is synonymous to double*?
A: As the definition of the typedef keyword says the declaration of typedef creates does not create a n...
Q: (Physics: acceleration) Average acceleration is defined as the change of velocity divided by the tim...
A: NOTE: Since programming language is not mentioned. Therefore answering the question in Python langau...
Q: If you write string "ABC" to an ASCII text file, what values are stored in a file?
A: If you write string "ABC" to an ASCII text file, what values are stored in a file?
Q: In Assembly programming language, define a pointer that points to a free location in memory. Write a...
A: Given: In Assembly programming language, define a pointer that points to a free location in memory. ...
Q: In the TMS320C6000 series pipeline operation, the number of instructions processed simultaneously is...
A: In TMS320C6000 series pipeline operation, at a given time 8 number of process is processed or fetche...
Q: How do you open a file so that you can append data into the file?
A: Given: How do you open a file so that you can append data into the file?
Q: Show how to calculate the number of iterations of a general Fortran 90style do loop. Your code shoul...
A: There area unit 2 kinds of loops, the investigation loop and therefore the general loop. The syntax ...
Q: Explain following techniques for combating Cyber Crime: Investigation Prevention Legislation Penalt...
A: 1) Investigation Law enforcement agencies, private companies, and organizations conduct investigatio...
Q: Which of the following attacks can lead to a token hijacking?a. Cross-side request forgeryb. Exploit...
A: Cross-Site Request Forgery (CSRF) is a type of JSDA within the browser execution context which explo...
Q: What is wrong in the following code: double* p1 = new double;double* p2 = p1; *p2 = 5.4; delete p1;c...
A: The is nothing wrong in your code but only i see the the error that is you have put the end1 instead...
Q: Design a generic function that returns a minimum element from an array. The function should have two...
A: Given: Design a generic function that returns a minimum element from an array. The function should h...
Q: When a program that uses the constructor overloading is compiled, C++ compiler checks the number of ...
A: Overloaded constructors essentially have the same name (name of the class) and different number of a...
Q: What are the different types of RAM families available?
A: RAM The full form of RAM is Random Access Access. Data stored on this type of memory is lost when t...
Q: If a base class has a customized destructor, are you required to implement the destructor in the der...
A: program code: // Header file section #include <stdio.h> using namespace std; Create the base ...
Q: How do you open a Web page from a Python program?
A: • An address on Internet (World Wide Web) is called a uniform resource locator (URL). • Sometimes it...
Q: Suppose you implement the postfix ++ as follows Rational Rational::operator++(int dummy){Rational te...
A: Given: Suppose you implement the postfix ++ as follows Rational Rational::operator++(int dummy){Rati...
Q: Smith is a course instructor of cpp programming and currently he is teaching conversions to his stud...
A: logic for counting the digits: while loop is used and it gets terminated when number is equal to ze...
Q: For Java Write an application that prompts the user for a password that contains at least two upper...
A: import java.util.Scanner; public class ValidPassword { public static void main(String[] args) { ...
Q: True or false? When invoking a constructor from a derived class, its base class’s no-arg constructor...
A: Given: True or false? When invoking a constructor from a derived class, its base class’s no-arg ...
Q: Write the pseudocode for the following program:1 A company sales manager requires a sales analysis o...
A: Pseudo Code: It is an informal way of writing the procedure of the program without considering any ...
Q: A program for the intelligent robot industry??
A: To learn a robotics programming we have to knowledge of mathematics where we used some trigonometric...
$marks = array(
"Sara" => array(
"
"
"Web" => 74,
),
"Diana" => array(
"Programming" => 78,
"DataBase" => 98,
"Web" => 66,
),
"Amy" => array(
"Programming" => 88,
"DataBase" => 76,
"Web" => 99,
),
);
1 : sort the array by the name of student from A-Z;
2 : search if Ram is exist :
if exiset print the value; else : student does not exist
3 : calculate the avg of each student and print it as :
the avg for Sara is : 84.66
Step by step
Solved in 2 steps
- Module/Week 8 ASSIGNMENTImagine you are using a two-dimensional array as the basis for creating the game battle- ship. In the game of battleship a `~' character entry in the array represents ocean (i.e., not a ship), a `#' character represents a place in the ocean where part of a ship is present, and a `H' character represents a place in the ocean where part of a ship is present and has been hit by a torpedo. Thus, a ship with all `H' characters means the ship has been sunk. Declare a two-dimensional array that is 25 x 25 that represents the entire ocean and an If statement that prints "HIT" if a torpedo hits a ship given the coordinates X and Y. Create a text file of 25 line. Each line has 25 characters. ~ represents water and # represents part of a ship. This file is the battleship game board. An example file might look like: Then write a C++ program that will read in the file representing the game board with 25 lines where each line has 25 characters corresponding to the description…Programming: Multi-Array Assignment Instructions Overview Using a two-dimensional array, you will create the game battleship using a text file that contains the board. The user will enter coordinates to try and find ships and sink them. Instructions Imagine you are using a two-dimensional array as the basis for creating the game battleship. In the game of battleship, a `~' character entry in the array represents ocean (i.e., not a ship), a `#' character represents a place in the ocean where part of a ship is present, and a `H' character represents a place in the ocean where part of a ship is present and has been hit by a torpedo. Thus, a ship with all `H' characters means the ship has been sunk. Declare a two-dimensional array that is 25 x 25 that represents the entire ocean and an If statement that prints "HIT" if a torpedo hits a ship given the coordinates X and Y. Create a text file of 25 line. Each line has 25 characters. ~ represents water and # represents part of…Declare an array named availablePizzas that stores 3 items of type Pizza. 1 #include 2 #include 3 4 typedef struct Pizza_struct { 5 6 7 } Pizza; 8 9 int main(void) { 10 11 12 13 strcpy(availablePizzas[0].pizzaName, "Barbecue"); 14 strcpy(availablePizzas [1].pizzaName, "Carbonara"); 16 15 strcpy(availablePizzas [2].pizzaName, "Ham and Cheese"); "Beef, chicken, bacon, barbecue sauce"); 17 strcpy(availablePizzas [1].ingredients, "Mushrooms, onion, creamy sauce"); 18 strcpy(availablePizzas [2].ingredients, "Ham, cheese, bacon"); 19 20 printf("%s: %s\n", availablePizzas [0].pizzaName, availablePizzas [0].ingredients); 21 printf("%s:%s\n", availablePizzas [1].pizzaName, availablePizzas [1].ingredients); printf("%s:%s\n", availablePizzas [2].pizzaName, availablePizzas [2].ingredients); return 0; 22 23 char pizzaName [75]; char ingredients [75]; 24 25 } strcpy(availablePizzas[0].ingredients,
- Write a definition for an array named items that can hold 100 Product structures. assume the Product structure is declared as follows:struct Product {string description; // Product description int partNum; // Part numberdouble cost; // Product cost };10. Lottery Application Write a Lottery class that simulates a lottery. The class should have an array of five integers named lotteryNumbers. The constructor should use the Random class (from the Java API) to generate a random number in the range of 0 through 9 for each element in the array. The class should also have a method that accepts an array of five integers that represent a per- son's lottery picks. The method is to compare the corresponding elements in the two arrays and return the number of digits that match. For example, the following shows the lotteryNumbers array and the user's array with sample numbers stored in each. There are two matching digits (elements 2 and 4). lotteryNumbers array: User's array: 7 4 4 2 1 3 7 3 In addition, the class should have a method that returns a copy of the lotteryNumbers array. Demonstrate the class in a program that asks the user to enter five numbers. The program should display the number of digits that match the randomly generated…Define the following structures: Manufacturer name : manufacturer’s name country : origin Vaccine vaccine name (e.g. Pfizer) : vaccine type (e.g MRNA) (e.g. $28.5) (e.g. 2 shots) name : type price : total price noofShot : total shots mf : Manufacturer type Declare an array called vaccineList that can store up to 10 Vaccine (refer to Question 4a) records. Initialize the first two elements with the following data: Vaccine Туре Price Shots Manu Origin $19.50 $13.60 Pfizer MRNA 2 Pfizer US Sinovac Whole Virus Sinovac Bio China
- CASE STUDY#:Grade Register Write a grade register program to keep and process the grades of students. The program contain a class called GradeRegister. This class has two data members known as CourseName and an array of integer called Grades. The array Grades keep the grades of students of the same course. GradeRegister class have three methods as GetHighestGrade(), GetLowestGrade() and GetAverageGrade().The method GetHighestGrade return the maximum grade as integer from the array Grades and GetLowestGrade return the minimum grade value as integer from the array Grades. The GetAverageGrade method will return the average of grades from Grades array as float value. The parameterized constructor inside GradeRegister class will take two parameters to initialize the two data members of same class as mentioned before. Write a driver class GradeRegisterDriver to declare and initialize an integer array for grades and pass through the GradeRegister class constructor along with the course name.…Array has both advantages and disadvantages.Pseudocode for the student grade calculator program, please Create a program to enter grades and calculate averages and letter grades. Need a class which will contain: Student Name Student Id Student Grades (an array of 3 grades) A constructor that clears the student data (use -1 for unset grades) Get functions for items a, b, and c, average, and letter grade Set functions for items a, n, and c Note that the get and set functions for Student grades need an argument for the grade index. Need another class which will contain: An Array of Students (1 above) A count of number of students in use You need to create a menu interface that allows you to: Add new students Enter test grades Display all the students with their names, ids, test grades, average, and letter grade Exit the program Add comments and use proper indentation. Nice Features: I would like that system to accept a student with no grades, then later add one or more grades, and when all grades are entered, calculate the…
- Pointers: P3: Given the following string, after you call func2, if you printed out the array, what would be printed out? string a = {"c","a","n", func2(a); "y"}; void func2(string *arr) { arr[3) - "t"; arr[2]="vi"; %3DSultan Qaboos University Department of Computer Science COMP2202: Fundamentals of Object Oriented Programming Assignment # 2 (Due 5 November 2022 @23:59) The purpose of this assignment is to practice with java classes and objects, and arrays. Create a NetBeans/IntelliJ project named HW2_YourId to develop a java program as explained below. Important: Apply good programming practices: 1- Provide comments in your code. 2- Provide a program design 3- Use meaningful variables and constant names. 4- Include your name, university id and section number as a comment at the beginning of your code. 5- Submit to Moodle the compressed file of your entire project (HW1_YourId). 1. Introduction: In crowded cities, it's very crucial to provide enough parking spaces for vehicles. These are usually multistory buildings where each floor is divided into rows and columns. Drivers can park their cars in exchange for some fees. A single floor can be modeled as a two-dimensional array of rows and columns. A…An array definition reserves space for the array. true or false