int x=22, y=17; if((x>30 || y<2)) cout<<"BAHRAIN"; else cout<<"MANAMA"; A MANAMA B BAHRAINMANAMA C. BAHRAIN D BAHRAINORMANAMA
Q: (PYTHON) A nutritionist who works for a fitness club helps members by evaluating their diets. As…
A: - We yave to help the nutritionist with the code.
Q: Write a console-based application that displays every perfect number from 1 through 10000. A number…
A: The C# code using System; namespace PerfectNumberApp { class Program { static bool…
Q: 7.17 (Even or Odd) Write expression-bodied method IsEven that uses the remainder operator (8 ) to…
A: PROGRAM EXPLANATION: - The Numbers class comprises of isEven function having bool return type. The…
Q: A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each…
A: The complete code in python programming language is below:
Q: use visual basic Depreciation to a Salvage Value of 0 . For tax purposes an item may be depreciated…
A: Design
Q: void getSales(int&); printStatus (int); //Line 1 void main(). { int courseSales; // Line 2 // Line 3…
A: As per the given problem, we have to fill the blanks with appropriate statements that makes the…
Q: 1. The circle has two data members, a Point representing the center of the circle and a float value…
A: #include<stdio.h>#include<math.h> typedef struct{ float x; float y;}Point; typedef…
Q: Passwords to a certain system are required to have: at least one uppercase letter, at least one…
A: Below I have provided the java program also i have attached the screenshot of the code and output:
Q: *3.9 (Financial application: payrollI) Write a program that reads the following infor- mation and…
A: use input function to take user’s input and store in variable . once data is stored in variable use…
Q: n C++, using STL algorithms, iterators, or containers get the total from the textfile icecream.txt.…
A: program: #include <iostream>#include <fstream>#include <string>#include…
Q: //Below is the starting code for this homework assignment// #include struct employees {…
A: To take input in the readEmployee function we use the arrow operator to take the input (->) It…
Q: *3.1 (Algebra: solve quadratic equations) The two roots of a quadratic equation ax? + bæ + c = 0 can…
A: Code: import java.lang.Math;import java.util.Scanner; class Roots{public static void main(String…
Q: A particular talent competition has 5 judges, each of whom awards a score between 0 and 10 to each…
A: Given: To write a program that uses these rules to calculate and display a contestant’s score. A…
Q: Assignment Write a program that calculates the revenue of a trip of a train composed of several…
A: Dear Student, As no programming language is mentioned so, I am coding it in c++. I will also provide…
Q: Write a program that calculates your grade in this class based on weights for each category and…
A: Algorithm Start Recieve input score from user for reading assignment and assign it to a variable(…
Q: int vall = 7; while (vall <= 10); vall+=val1%5;
A: 1-The loop will not execute any single time. Because while loop syntax is wrong here. So, here…
Q: Lab 5B-Value Returning Functions Falling Distance When an object is falling because of gravity, the…
A: Here I have created a file named distance.py. Inside this, I have created a function named…
Q: Develop a C# application that inputs one salesperson’s items sold for the last week, then calculates…
A: Hello Student. Warm welcome from my side. Hope you are doing great . I will try my best to answer…
Q: 7) Solving quadratic equation program Let's consider the general formula of a quadratic equation :…
A: Required: Python program to solve the quadric equation. Required code with comments for…
Q: I am using python. How would this code be written? Can someone explain the loop concept?
A: Program: #input for available candy barscandyBar=int(input("Please enter the number of candy bars…
Q: struct ID { int x; int y; }; struct name { ID r; }; int main() { name a[2]; for (int i=0;i<2;i++) {…
A: Given code is struct ID { int x; int y; }; struct name {ID r; }; int main() { name a[2]; for(int…
Q: // Add to this partially built code // fill in code where there is a TODO #include using namespace…
A: Add data type char for variables destination and typeOfDay. Define bool variable isDayTime and…
Q: T/F 9) The assignment statement d = p; is legal even though d is not a Poodle.
A: Please find the answer to the above question below:
Q: Bulgarian solitaire def bulgarian_solitaire(piles, k): You are given a row of piles of pebbles,…
A:
Q: This is a simulated chess game. With this project, I want you to move all the pieces on one side of…
A: It is defined as a general purpose programming language and widely used now a days for competitive…
Q: C++ programming Chapter(s) Covered: Chapter 1-8 Concepts tested by the program: Working with one…
A: Code: #include<iostream>#include <algorithm>using namespace std; // Global…
Q: int a=6; int s-%3; while(a>10) S=s+a; cout<<"a="<<a<<endl; a+=23; cout<<"a="<<a; A) a=8 b=6 B. a=6…
A: Given : int a=6; int s=0; while(a>10) { s=s+a; cout<<"a="…
Q: 10) The assignment statement p = d; is legal even though p is not a Dog.
A: Please see the next step for solution
Q: Given two integers that represent the miles to drive forward and the miles to drive in reverse as…
A: CODE: main.cpp #include "simplecar.h" #include <iostream>#include <vector>using…
Q: A flight company computes the ticket price of a travel depending on the reservation rate and the…
A: The requested Java program code has been provided in the next step using if-else statements.
Q: Hinclude Hinclude ciomanip> using namespace std; void test(int first, int& second); int main () int…
A: The output is below:
Q:
A: C++ program to Book Airline Tickets. The Destination is Chicago, Miami, and Portland. Variable in…
Q: Create class Employee. • Use static variable annualTaxRate to store the annual tax rate for all…
A: These programs can be asked from control statements, array, string, oops etc. Java basic programs…
Q: *2.25 (Financial application: payroll) Write a program that reads the following infor- mation and…
A: The complete code with output given below.
Q: ISSUE NEEDED TO BE SOLVED: I attached the error codes that keep presenting themselves with the code…
A: Below is the explanation:
Q: #include struct employees { char name[20]; int ssn[9]; int yearBorn, salary;…
A: #include <stdio.h> struct employees { char name[20]; int ssn[9]; int yearBorn,…
Q: void minimum (int i1, int i2) { if (i1 > n >> m; minimum (n, m); return 0; }
A: .file "p.cpp" .text .section .rdata,"dr" _ZStL19piecewise_construct:…
Q: 2 class lineType | Instructions 3 { 4 public: The equation of a line in standard form is ax void…
A: Code for class LineType: #include <iostream> using namespace std; class LineType { public:…
Q: pseudocode
A: Given :- In the above question, the statement along with the given pseudo code is mention in the…
Q: change normal body temperature to 36.5–37.5 °C #include using namespace std; int main() { float…
A: Given, Change the code so that normal body temperature is 36.5–37.5 °C
Q: Java Script You go to a jewelry shop and try to find the most expensive piece of jewelry. You write…
A: In this problem, we need to design a javascript program. Input - one map with multiple arguments…
Q: Define an enumeration type, triangleType, that has the values scalene, isosceles, equilateraland…
A: Given: triangleType, that has the values scalene, isosceles, equilateraland noTriangle Write a…
Q: 4.23 (Financial application: payroll) Write a program that reads the following information and…
A: C code#include<stdio.h>#include<string.h> int main(){char employeeName[20]="";double…
Q: mplement a class CreditCard. A CreditCard is defined by a 16-digit number and an expiration date. A…
A: Lets see the solution.
Q: 5.21 (Pythagorean Triples) A right triangle can have sides whose lengths are all integers. The set…
A: Code: import java.io.*; import java.util.*; // Class for Pythagorean number table generation public…
Q: Programming Exercise 10 in Chapter 6 asks you find the mean and standard deviation of five…
A: The solution to the given problem is below.
Q: color: one of the following strings: 'red', 'blue', 'silver', 'white', 'black' year: year of…
A: Task :- Give an expression for given statement.
Q: Trivia Game In this programming exercise, you will create a simple trivia game for two players. The…
A: Question.py • Define the class named “Question”. ○ Define “__init__()” method for “Question”…
Step by step
Solved in 2 steps with 1 images
- > > ©Citizen ©Company model model • licenseNo: String e location: String expiryDate: Date Company(int, String,String,String,Date) • getLicenseNo() String • setLicenseNo(String).void • getLocation() String • setlocation(String) void • getExpiryDate().Date • setExpiryDate(Date).void • toString() String nationalNo: int - bDate: Date nationality: String FCitizen(int,String,int,Date,String) • getNationalNo() int • setNationalNo(it) void • getbDate():Date • setbDate(Date):void • getNationality() String • setNationality(String) void toString() String > ©Customer model -bookings • book • cance id: int name: String FCustomer(int,String) • removeBookedObject(int).void • getBookings() ArrayList • setBookings(ArrayList)void • getid()int • setid(int).void • getName():String • setName(String) void • getTotalPayment() double toString() String -booki -customers <If DELIMITED BY"" OR "." is used in unstringing a field that contains "JON J. SMITH" then the third receiving field listed will contain JON spaces//3. toggleCommentSection//a. Receives a postId as the parameter//b. Selects the section element with the data-post-id attribute equal to the postId//received as a parameter//c. Use code to verify the section exists before attempting to access the classList//property//d. At this point in your code, the section will not exist. You can create one to test if//desired.//e. Toggles the class 'hide' on the section element//f. Return the section element function code so far passes a.b,c fails rest function toggleCommentSection(postId) { // If Post Id Is Passed, Return Undefined if (!postId) { return undefined; } else { // Else, Get All Comment Sections const commentSections = document.querySelectorAll('[data-post-id]'); // Loop Through Each Comment Section for (let i = 0; i < commentSections.length; i++) { const commentSection = commentSections[i]; // If Post Id Attribut Of Comment Section Is Equal To Post Id Passed Arg…LLNode: public class LLNode<T> { protected T info; protectedLLNode<T>link; public LLNode(Tinfo){ this.info=info; link=null; } publicvoidsetInfo(Tinfo){ this.info=info; } publicTgetInfo(){ return info; } publicvoidsetLink(LLNode<T>link){ this.link=link; } publicLLNode<T>getLink(){ return link; } @Override public String toString(){ return "LLNode [info="+info+", link="+link+"]"; } } MyLLNode: public class MyLLNode { LLNode<String>head; public MyLLNode(){ this.head=null; } public MyLLNode(String first){ this.head=newLLNode<String>(first); } //------------------------------------------------------------- public void addAtEnd(String newstr){ LLNode<String>node=head; LLNode<String>newNode=newLLNode<String>(newstr); if(this.head==null){ this.head=newNode; } else{ while(node.getLink()!=null){ node=node.getLink(); } node.setLink(newNode); } } //------------------------------------------------------------- public void addAtFront(String…3-Fully explain the following code and draw all possible outputs. The XMLHttpRequest Object Change Content function loadDoc() { const xhttp = new XMLHttpRequest(); xhttp.onload = function() { document.getElementById("demo").innerHTML = } this.responseText; xhttp.open("GET", "ajax_info.txt"); xhttp.send(); } The following is ajax_info.txt AJAX AJAX stands for Asynchronous JavaScript And XML./** To change this license header, choose License Headers in Project Properties.* To change this template file, choose Tools | Templates* and open the template in the editor.*/package Apps; import ADTs.QueueADT;import DataStructures.ArrayStack;import ADTs.StackADT;import DataStructures.LinkedQueue;import java.util.Scanner; /**** @author Qiong*/public class RepeatStrings {public static void main(String[] argv) throws Exception{final int SIZE = 3;Scanner keyboard = new Scanner(System.in);QueueADT<String> stringQueue;//stringQueue = new CircularArrayQueue<String>(SIZE);stringQueue = new LinkedQueue<String>();StackADT<String> stringStack;stringStack = new ArrayStack<String>(SIZE);String line;for (int i = 0; i < SIZE; i++){System.out.print("Enter a line of text which includes only 3 words > ");line = keyboard.nextLine();//TODO enque the new element//TODO push the new element}System.out.println("\nOrder is: ");for (int i = 0; i < SIZE; i++){// TODO…Q3 of Act requestToRegister } GUI } Your answer Course Section 2: requestToRegister (aStudent) } opt 3: preReq=getPrerequisite 4:hasPrerequisite has passed Course(prereq) ThasPrerequisite] 5: create public void requestToRegister(Student aStudent){ // FILL IN HERE aReg: Registration 7:add ToRegistration List(aReg) Fill the body of the following Java method according to the sequence diagram depicted above. public class CourseSection { aStudent: Student 6: add ToShedule! CourseCreate three static comparators: one that compares points based on their x, y, and distance from the origin; the other two compare points based on any Point2D data type. For the Point2D data type, create two non-static comparators: one that compares objects based on how far they are from a given point, and the other that compares objects based on how far they are from a given point polarly.Complete this Javascript file. NOTE: Use the API endpoints available at https://jsonplaceholder.typicode.com/ to get the data required in these exercises. // HINT: Read the documented Resources and Routes. Also the guide: https://jsonplaceholder.typicode.com/guide/ 3) Create a function named "getComments". This function needs to accept a "postID" parameter. Use Fetch with Async/Await to request all the comments for the postID that is passed in as a parameter. The function should return all the comments for the requested postID as JSON data. 4) Create a function named "getUser". This function needs to accept a "userID" parameter. Use Fetch with Async/Await to request the data for the requested user. The function should return JSON data. 5) Create a function named "getTodosForUser". This function needs to accept a "userID" parameter. Use Fetch with Async/Await to request all of the todos for the requested user. The function should return JSON data.Create an Employee data type, and then create three employee objects. Each employee object has his/her name, employee ID, and balance. Set the first employee object’s name as “Lacey”, ID as 1234, and balance as 100; Set the second employee object’s name as “Dylan”, ID as 5678, and balance as 0; Set the third employee object’s name as “James”, ID as 9012, and balance as 50; Write a method for withdrawing money; Write a method for depositing money; Create one constructor for the objects Lacey and James, and one constructor for the object Dylan; Set the fields as private. Withdraw 50 on all three employees, and after that display each of their names, IDs, and balances.The data:A ={ "action": [ { "logType": “xxx” }, { "logType": “xxx” }, { "logType": “yyy” }, { "logType": “xxx” }, { "logType": “yyy” }, { "logType": “zzz” }, { "logType": “yyy” }, { "logType": “xxx” }, { "logType": “yyy” }, { "logType": “zzz” }}———————————————————————— A desire output:{ “xxx”: 4, “yyy”: 4, “zzz”: 2} How could I make the above result…?Customer This class should now implement the Comparable interface. Customer instances should be ordered by their last name, then first name, and finally the name of their associated building. toString() - Add this method that returns a String with the following format: <lastName>, <firstName> Reading This class should now implement the Comparable interface. Reading instances should be ordered by their timestamp. XmlHandler The following methods should be updated: startElement() - The handler logic should be modified such that it can now create and associate Customer, Building, Room, Device, and Reading objects. endElement() - Modify this method such that the current customer instance is added to the ArrayList of customers when a closing customer element is encountered. No hand written and fast answer pleaseSEE MORE QUESTIONS