Questions
What are the functions for printing to the Serial monitor and printing to the Serial monitor...

What are the functions for printing to the Serial monitor and printing to the Serial monitor on a new line? comment on the differences.

In: Computer Science

Write a program that prompts the user for a grade (0-100), and asks if the student...

Write a program that prompts the user for a grade (0-100), and asks if the student is a graduate student or not. (Y/N).  

  • If the student is a graduate student, the grade is reduced by 10%, because we have a higher expectation for graduate students, in an undergraduate class.
  • The program then computes, and prints the letter grade based on the scale below.
    • 90-100 A
    • 80-89 B
    • 70-79 C
    • 60-69 D
    • 0-60 F
  • The program also provides feedback based on the letter grade the student receives.
    • If letter grade A or B, it will print “Excellent.”
    • If the student gets a C or D, it will print “Could improve.”
    • If letter grade is F, it prints “Need work.”

In: Computer Science

Without running the program, what happens if you run StackofStringsApp with “to be or not to...

Without running the program, what happens if you run StackofStringsApp with
“to be or not to be that – is - - the question – whether tis nobler - - -“? Show how you came up with the answer (show your work). Write this on paper by hand.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

package stackofstringsapp;

/******************************************************************************
*
* % more tobe.txt
* to be or not to - be -
*
* % java FixedCapacityStackOfStrings
* to be or not to - be - -
* to be not
*
* Remark: bare-bones implementation. Does not do repeated
* doubling or null out empty array entries to avoid loitering.
*
******************************************************************************/

import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Scanner;
import csci232library.StackOfStrings;
import csci232library.ListStack;
import java.io.File;
import java.io.FileNotFoundException;

public class StackOfStringsApp {
public static void main(String[] args) throws FileNotFoundException {
  
Scanner in = new Scanner(System.in);
  
int max = 1000;
  
String item;
  
  
StackOfStrings stack = new StackOfStrings(max);
  
// ListStack stack = new ListStack();
  
  
// read the strings from a file
File file = new File(args[0]);
  
Scanner inpFile = new Scanner(file);
  
int i = 0;
while(inpFile.hasNext()){
item = inpFile.next();
  
if (!item.equals("-")) stack.push(item);
else if (stack.isEmpty()) System.out.println("BAD INPUT");
else System.out.print(stack.pop() + " ");
}

// print what's left on the stack
System.out.print("\nLeft on stack: ");
for (String s : stack) {
// for (Object s : stack) {
System.out.print(s + " ");
}
System.out.println();
}
}

In: Computer Science

int get_value(int array[], unsigned int index) { ????? } int main() { int data[] = {1,...

int get_value(int array[], unsigned int index) { ????? } int main() { int data[] = {1, 2, 3, 4}; get_value(data, 2) = 100; } Write ????? that returns the value in the array at index: Question Blank type your answer...

In: Computer Science

<html> <head>     <title>Nick D'Angelo</title> </head> <body>     <h1>This is a header</h1>     <h2>This is a subheader</h2>  &nbs

<html>

<head>

    <title>Nick D'Angelo</title>

</head>

<body>

    <h1>This is a header</h1>

    <h2>This is a subheader</h2>

    <p>The quick <b>brown</b> fox jumped <i>over</i> the lazy dog.</p>

    <!--additional paragraph-->

    <!--here two words are bold and two are italicized-->

    <p>Pack my <b>box</b> with <i>five</i> dozen <b>liquor</b> <i>jugs</i>. Go to <a href='https://www.esu.edu' target="_blank">site</a></p>

    <a href="http://ndangelo.com">Nick's Homepage</a>

    <a href="http://ndangelo.com" target="_blank">Nick's Homepage</a>

</body>

<html>

Add an Ordered, Unordered, Definition and Nested list to your html file (one for each). Each should be at least 10 lines or more.

Make one list item in each list a hyperlink. Make one bold, and make one italic. Also make a word in each list underlined.

In: Computer Science

7.What is the hexadecimal equivalent of the 16-bit signed integer -32,760 ? *Note: answer in two's...

7.What is the hexadecimal equivalent of the 16-bit signed integer -32,760 ? *Note: answer in two's complement*

In: Computer Science

Please use C++ to complete this question follow the requirement. Question: Implement a class called DoublyLinkedList....

Please use C++ to complete this question follow the requirement.

Question: Implement a class called DoublyLinkedList. In the main function, instantiate the DoublyLinkedList class and make sure that there is a user loop and a menu so that the user can access all the list operators. You should implement the following operators, and any others that you may deem best. DestroyList InitializeList GetFirst InsertFirst, InsertLast, Insert DeleteFirst, DeleteLast, Delete IsEmpty Length Print, ReversePrint

In: Computer Science

C++ split_list(Lst,N): split lst into two parts with the first part having N elements, and return...

C++
split_list(Lst,N): split lst into two parts with the first part having N elements, and return a list that contains these two parts.

yes it is an array

In: Computer Science

Part 2: BasalMetabolicRate Write a Java program that estimates the number of calories your body needs...

Part 2: BasalMetabolicRate Write a Java program that estimates the number of calories your body needs to maintain your weight if you do no exercise. This is called your BMR (or Basal Metabolic Rate) and can be calculated with the Harris-Benedict equation. The calories needed for a woman to maintain her weight is: BMR (calories) = 655 + (4.35 * weight in pounds) + (4.7 * height in inches) - (4.7 * age in years) The calories needed for a man to maintain his weight is: BMR (calories) = 66 + (6.23 * weight in pounds) + (12.7 * height in inches) - (6.8 * age in years) Write a program that allows the user to input his or her weight in pounds, height in inches, and age in years. Your program should output two things: 1) The number of calories needed to maintain one's weight for both a woman and a man of the same input weight, height and age AND 2) The number of chocolate bars that should be consumed to maintain this amount of calories (a typical chocolate bar contains about 230 calories) Here is a sample transaction with the user: Please enter your weight (lb): 160 Please enter your height (in): 70 Please enter your age: 40 BMR (female):1492 calories BMR (male) : 1680 calories If you are female, you need to consume 6.5 chocolate bars to maintain weight. If you are male, you need to consume 7.3 chocolate bars to maintain weight.

In: Computer Science

Write a Program(code) in Python that performs a large number of floating-point operations and an equal...

Write a Program(code) in Python that performs a large number of floating-point operations and an equal number of integer operations and compares the time required. Please attach an output.

In: Computer Science

Encrypt the given plaintext with the key. Built the key matrix (big size). And show how...

Encrypt the given plaintext with the key. Built the key matrix (big size). And show how you get each letter ciphertext (you can do that by making shapes and arrows in key matrix).

No need to draw key matric again and again.   

Show all your work. If you just write cipher text and key matric without showing (shapes and arrow on key matrix) that how you get the ciphertext then your marks will be deducted.

key :  alphabets

plaintext :   smartness

In: Computer Science

Using JAVA 2. A run is a sequence of adjacent repeated values. Write a code snippet...

Using JAVA

2. A run is a sequence of adjacent repeated values. Write a code snippet that generates a sequence of 20 random die tosses in an array and that prints the die values, marking the runs by including them in parentheses, like this:

1 2 (5 5) 3 1 2 4 3 (2 2 2 2) 3 6 (5 5) 6 (3 3)

Use the following pseudocode:

inRun = false

for each valid index i in the array

If inRun

If values [i] is different from the preceding value

Print )

inRun = false

If not inRun

If values[i] is the same as the following value

Print (

inRun = true

Print values[i]

//special processing to print last value

If inRun and last value == previous value, print  “ “ + value + “)”)

else if inRun and last value != previous value, print  “) “ + value )

else print “ “ + last value

3.

Implement a theater seating chart  as a two-dimensional array of ticket prices, like this:

{10, 10, 10, 10, 10, 10, 10, 10, 10, 10}

{10, 10, 10, 10, 10, 10, 10, 10, 10, 10}

{10, 10, 10, 10, 10, 10, 10, 10, 10, 10}

{10, 10, 20, 20, 20, 20, 20, 20, 10, 10}

{10, 10, 20, 20, 20, 20, 20, 20, 10, 10}

{10, 10, 20, 20, 20, 20, 20, 20, 10, 10}

{20, 20, 30, 30, 40, 40, 30, 30, 20, 20}

{20, 30, 30, 40, 50, 50, 40, 30, 30, 20}

{30, 40, 50, 50, 50, 50, 50, 50, 40, 30}

Write a code snippet that:

- uses a for loop to print the array with spaces between the seat prices

- prompts users to pick a row and a seat using a while loop and a sentinel to stop the loop.

- outputs the seat price to the user.

4. A pet shop wants to give a discount to its clients if they buy one or more pets and at least three other items. The discount is equal to 20 percent of the cost of the other items, but not the pets.

Write a program that prompts a cashier to enter each price and then a Y for a pet or N for another item. Use a price of –1 as a sentinel. Save the price inputs in a double(type) array and the Y or N in a corresponding boolean (type) array.

Output the number of items purchased, the number of pets purchased, the total sales amount before discount and the amount of the discount.

-----------------

Thank you so much!

In: Computer Science

Suppose you are given an integer c and an array, A, indexed from 1 to n,...

Suppose you are given an integer c and an array, A, indexed from 1 to n, of n integers in the range from 0 to 5n (possibly with duplicates). i.e. 0 <= A[i ] <= 5n " I = {1, .., n}.

a.) Write an efficient algorithm that runs in O(n) time in a pseudo code for determining if there are two integers, A[i] and A[j], in A whose sum is c, i.e. c = A[i] + A[j], for 1 <= i < j <= n. Your algorithm should return a set of any pair of those indices (i , j). If there were no such integers, return (0, 0).

b.) Implement your algorithm of Q7 either in Python programming language where A[1:10] = [30, 25, 10, 50, 35, 45, 40, 5, 15, 20] and c = 40.

In: Computer Science

Answer the following question from the perspective of AVR (C language) How to set the data...

Answer the following question from the perspective of AVR (C language)

How to set the data direction (output/input) in (AVR, c language)?

Write a statement to turn ON a pin, say D3.

Write a statement to turn OFF a pin, say D3.

How to toggle a pin?

In: Computer Science

4.4 Formulate the functional requirements for the calendar management system described below. Limit the length of...

4.4 Formulate the functional requirements for the calendar management system described below.

Limit the length of the SRS to no more than two pages. This calendar management software

allows the user to schedule personal activities such as meetings and tasks to be performed.

An activity can take place on a future date during a certain period of time. An activity can

take place for several consecutive days. Each activity has a brief mnemonic description. An

activity can be a recursive activity, which takes place repeatedly every hour, every day, every

week, or every month. A user can schedule an activity using a month-by-month calendar

to select the date or dates, and then zooms in to select the begin time and end time on a

date. The calendar system shall notify the user by email, text message, or phone call the day

before and on the activity day. The user can review past activities and modify the schedule

including updating and deleting activities.

Take the system in 4.4 above, draw a UML class diagram as a domain model (hint: perform the domain modeling steps)

In: Computer Science