Questions
(Python) In a weather station, there is a sensor that measures the temperature three times a...

(Python) In a weather station, there is a sensor that measures the temperature three times a
day (in Celsius). Write a program that asks the user to input three numbers, corresponding to the
sensor's three readings for a particular day. Then, print the minimum, maximum and average value
of the three numbers.
Note: If one or two inputs are either less than -70, or greater than +50 degrees, you should ignore
those one or two inputs, and calculate the minimum, maximum and average using only the other
inputs. If all 3 inputs are either less than -70 or greater than 50, your code should print "Broken
sensor!" and not perform any calculations.
For this question, you must not use any built-in functions or functions from math
module except print(), input() or oat(). You must compute the minimum, maximum
and average values using if statement and arithmetic operators. This means that you
cannot use the built-in max() or min() functions.

In: Computer Science

1. Complete Programming Problem #14, Stadium Seating, on page 199 of the textbook. A revised form...

1. Complete Programming Problem #14, Stadium Seating, on page 199 of the textbook. A revised form (original form provided in Figure 3-49) is provided below based upon theAdditional Requirements. Data is also provided to test the application.

The ADDITIONAL REQUIREMENTS described below MUST also be implemented:

  • Apply the currency format string for displaying monetary output (i.e., displays a leading currency symbol, digits, comma separators, and a decimal point)
  • Apply the number format string for displaying non-monetary output with no decimal places (i.e., the precision must be specified)
  • Implement simple exception handling to catch any exceptions that are thrown and display the exception's default error message
  • Implement named constants where applicable (i.e., the cost of the different classes of seats)
  • Calculate the total tickets sold for each individual transaction
  • Implement the following fields:
    • Sum of revenue which accumulates the overall revenue (i.e., running sum of the Total Revenue)
    • Sum of Tickets which accumulates the total tickets (i.e., running sum of the Total Tickets)
    • Count of Transactions which counts the number of times the Calculate Revenue button is clicked (i.e., adding to the Count of Transactions)
  • Add the following Label controls to the form (Note: GroupBox controls are used to group the various TextBox and Label controls):
    • Total Tickets (descriptive and output)
    • Sum of Revenue (descriptive and output)
    • Sum of Tickets (descriptive and output)
    • Transactions (descriptive and output

This the instructions for my class and I am lost. Here is my code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _3333_SilmonD_Lab03
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
  

private void calRevButton_Click(object sender, EventArgs e)
{
double CATickets;
double CBTickets;
double CCTickets;
double totalRevenue;


  

if (classATicketsTextBox.Text != "" && classBTicketsTextBox.Text != "" && classCTicketsTextBox.Text != "")
{
CATickets = double.Parse(classATicketsTextBox.Text);
CBTickets = double.Parse(classBTicketsTextBox.Text);
CCTickets = double.Parse(classCTicketsTextBox.Text);

CATickets = CATickets * 15.0;
CBTickets = CBTickets * 12.0;
CCTickets = CCTickets * 9.0;

totalRevenue = CATickets + CBTickets + CCTickets;
  
classARevenueTextBox.Text = CATickets.ToString("c");
classBRevenueTextBox.Text = CBTickets.ToString("c");
classCRevenueTextBox.Text = CCTickets.ToString("c");
totalRevenueTextBox.Text = totalRevenue.ToString("c");
sumofRevenueTextBox.Text = totalRevenue.ToString("c");
  
}
}

private void clearButton_Click(object sender, EventArgs e)
{
classATicketsTextBox.Text = "";
classBTicketsTextBox.Text = "";
classCTicketsTextBox.Text = "";
classARevenueTextBox.Text = "";
classBRevenueTextBox.Text = "";
classCRevenueTextBox.Text = "";
totalRevenueTextBox.Text = "";
}

private void exitButton_Click(object sender, EventArgs e)
{
this.Close();
}

private void sumofRevenueTextBox_TextChanged(object sender, EventArgs e)
{

}

private void totalTicketsBox_TextChanged(object sender, EventArgs e)
{

}
}
}

In: Computer Science

For java code: Create a library to do it all. The attached file has all the...

For java code: Create a library to do it all. The attached file has all the directions and methods that need to be included in your library (.jar). You will create a .jar file, and a tester app that will include your .jar file (Add External JAR).

The attached file below:

Create a java project called MyLibrary, a package called net.dtcc.lib, and a class called AllInOne. The class should have the following methods, each method should return the answer:
Area:
Area of Rectangle
Area of Square
Area of Triangle
Area of Circle
Area of Trapezoid
Area of Ellipse
Area of Pentagon
Area of Parallelogram
Area of Rhombus
Area of Hexagon
Area of Polygon
** Pass in appropriate variables

Fractions:
Adding 2 fractions
Subtracting 2 fractions
Multiplying 2 fractions
Dividing 2 fractions
** Pass in numerator/denominator of first number; numerator/denominator of second number

Binary:
Binary to decimal conversion  
** Pass in binary number

Temperature:
Celcius to Fahrenheit
Celcius to Kelvin
Fahrenheit to Celcius
Fahrenheit to Kelvin
** Pass in temperature to be converted 

Volume:
Volume of Cube
Volume of Box
Volume of Cylinder
Volume of Cone
Volume of Sphere
** Pass in appropriate variables

Perimeter:
Perimter of Square
Perimeter of Rectangle
** Pass in appropriate variables

Circumference:
Circumference of Circle
** Pass in appropriate variables

Pythagorus Theorem:
** Pass in 2 values (a,b)

Once you have finished the class, create a library (.jar) file with the name Taz2015.jar

Next create another java project called Tester, a package called .net.dtcc.tester, and a class called LibTester. You will need to import your Taz2015.jar to the project (hint: remember derby.jar?). In this class, you should test each method in the library.

In: Computer Science

Dev c++ should be used to answer the question above. SCIMS at USP wants to maintain...

Dev c++ should be used to answer the question above.

SCIMS at USP wants to maintain student records using linked lists. The school currently offers 3 first-year courses which are CS100, CS101 and CS110. These courses are compulsory and are required by students to do in a semester. All courses have two assignments (20% each ), a mid-semester test (10%) and final exam (50%). The following file contains the students' records, course lists with appropriate marks. Student file contains students id number and name. Each course file contains students mark (assignment 1, assignment 2, MST and final exam). Beside each assessment in the file, the total mark for that particular assessment is given.

Student. Txt
ID Fname Lname
1234 David Dalton
9138 Shirley Gross
3124 Cynthia Morley
4532 Albert Roberts
5678 Amelia Pauls
6134 Samson Smith
7874 Michael Garett
8026 Melissa Downey
9893 Gabe Yu

CS100.txt
ID A1(50) A2(50) MST(30)FE(100)
1234 25 25 20 60
9138 15 30 10 50
3124 30 20 20 80
4532 36 47 30 90
5678 10 10 10 30
6134 45 50 25 20
7874 36 5 10 35
8026 47 2 12 40
9893 35 20 20 56

CS101.txt
ID A1(40) A2(30) MST(20)FE(100)
1234 15 25 20 50
9138 20 30 20 70
3124 40 20 20 80
4532 16 12 10 75
5678 10 10 10 30
6134 25 30 20 20
7874 36 5 10 35
8026 5 22 12 40
9893 35 20 20 56

CS110.txt
ID A1(30) A2(50) MST(30)FE(100)
1234 15 25 20 50
9138 20 30 20 70
3124 40 35 30 80
4532 16 12 10 75
5678 20 30 20 30
6134 25 30 20 20
7874 36 5 10 35
8026 5 22 12 40
9893 35 20 20 56

You are required to write a program for the school to do grade calculation and analysis using linked lists. The following criteria need to be used for grade calculation for each course:
Total Score Grade GPA
85 or more A+ 4.5
78 to 84 A 4
71 to 77 B+ 3.5
65 to 70 B 3
56 to 64 C+ 2.5
50 to 55 C 2
40 to 49 D 1.5
0 to 39 E 1
Please do note that if the student does not meet the minimum 40% mark in the final exam and the course total mark is above 50 then the student should be given a D grade.
Requirements
1. Draw the structure of the linked list using an appropriate tool with all relevant data from the file.
2. This problem must be solved using linked list. You have to use classes to create linked list.
3. The main program should be able to do the following:
 Create a linked list for each file and store the records of the file.
 Calculate the total mark and grade of a student for each course which must be stored in the list.
 Create a menu for the user that can do the following:
o Exit program
o Display all students for SCIMS
o Display the marks and grade for each course. The course code will be entered by the user.
o Display all students who got D grade because the minimum 40% was not met in the final exam. The display should include student ID, name, course code, total mark.
o Display all students who failed all three courses.
o Display students in each course who got A+.
o Calculate and display semester GPA for all students. Semester GPA is calculated by adding GPA for all courses and then divided by the number of courses.
o Delete a student record from all the linked lists. The program should prompt the student id number.
o Add a student record in all linked lists.
 Except the first menu, all others should be implemented using functions of the main program.

Dev c++ should be used to answer the question above.

In: Computer Science

Tree Reconstruction - Pre+In => Post (C++) Give you pre-order traversal and in-order traversal, please output...

  • Tree Reconstruction - Pre+In => Post (C++)

Give you pre-order traversal and in-order traversal, please output post-order traversal.

Input

Two lines. Pre-order traversal and in-order traversal.

Output

Post-order traversal.

Sample Input

GDAFEMHZ

ADEFGHMZ

Sample Output

AEFDHZMG

In: Computer Science

Assume that the population of Mexico is 128 million and that the population increases 1.01 percent...

Assume that the population of Mexico is 128 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 323 million and that the population is reduced 0.15 percent annually. Write an application that displays the populations for the two countries every year until the population of Mexico exceeds that of the United States, and display the number of years it took. Save the file as Population.java.

In: Computer Science

5NCCA: Many believe that cloud computing can reduce the total cost of computing and enhance “green...

5NCCA:

Many believe that cloud computing can reduce the total cost of computing and enhance “green computing” (environmental friendly). Why do you believe this to be correct? If you disagree, please explain why?

In: Computer Science

I am using the program Python. Assume a function called count_primes is pre-definied. If consumes two...

I am using the program Python.

Assume a function called count_primes is pre-definied. If consumes two int arguments start and stop that returns the number of prime integers between start (inclusive) and stop (exclusive).

Note: The start value must be less than or equal to the stop value.

Enter 3 assertEqual statements to test the count_primes function.

In: Computer Science

Design and implement a program to allow a college administrator to register new students and add...

Design and implement a program to allow a college administrator to register new students and
add courses to the existing one. In addition, your program should allow the administrator to do
the following:
• Add/Remove a new student
• Add/Remove a course to/from a selected student
• Search for a student either by last name or by id.
• Search for a course either by name or by id.
• Display a selected student along with the courses s/he is registered for.
• List all registered students along with the courses each student is registered for.

Using java

In: Computer Science

Python program please no def, main, functions Given a list of negative integers, write a Python...

Python program

please no def, main, functions

Given a list of negative integers, write a Python program to display each integer in the list that is evenly divisible by either 5 or 7. Also, print how many of those integers were found.

Sample input/output:

Enter a negative integer (0 or positive to end): 5
Number of integers evenly divisible by either 5 or 7: 0

Sample input/output:

Enter a negative integer (0 or positive to end): -5
-5 is evenly divisible by either 5 or 7.
Enter a negative integer (0 or positive to end): -35
-35 is evenly divisible by either 5 or 7.
Enter a negative integer (0 or positive to end): -3
Enter a negative integer (0 or positive to end): -7
-7 is evenly divisible by either 5 or 7.
Enter a negative integer (0 or positive to end): 0
Number of integers evenly divisible by either 5 or 7: 3

In: Computer Science

a.Draw the block diagram of a 4-bit ripple carry adder using full adders. Use the black...

a.Draw the block diagram of a 4-bit ripple carry adder using full adders. Use the black box of the full adder in question 1.

b.Draw the block diagram of a 4-bit adder/subtractor circuit. The circuit should have an input (add/sub) that determines the operation (0: add, 1: subtract)

In: Computer Science

Explain recurrence including the explanation of Merge-sort and recursion tree. Then provide one example of pros...

Explain recurrence including the explanation of Merge-sort and recursion tree. Then provide one example of pros and cons.

In: Computer Science

Create a Java Program/Class named MonthNames that will display the Month names using an array. 1....

Create a Java Program/Class named MonthNames that will display the Month names using an array.

1. Create an array of string named MONTHS and assign it the values "January" through "December". All 12 months need to be in the array with the first element being "January", then "February", etc.

2. Using a loop, prompt me to enter an int variable of 1-12 to display the Month of the Year. Once you have the value, the program needs to adjust the given input to align with the array index and then confirm that the variable is in the range of 0-11. If it is not, display "Invalid Entry". If it is in range, display the string the matches the given entry. Then prompt to continue.

Tip:For the String input for the Prompt to Continue - it is preferable to use .next() instead of .nextLine(). Otherwise you will run into the Scanner Bug described in Section 3.10.

3. Display "Done" after the loop processing has ended.

Enter the Month of the Year: 1

The month name is January

Try again (Y/N): Y

Enter the Month of the Year : 2

The Month name is February.

Try again (Y/N): Y

Enter the Month of the Year : 55

Invalid Entry

Try again (Y/N): N

You can copy the code below to seed your array.:

{"January","February","March","April","May","June","July","August","September","October","November","December"};

In: Computer Science

Decide which one of the following statements is an example of Inductive OR Deductivereasoning: It is...

  1. Decide which one of the following statements is an example of Inductive OR Deductivereasoning:
  1. It is dangerous to drive on icy streets. The streets are icy now, so it is dangerous to drive now.
  2. Elephants have cells in their bodies and all cells have DNA, so elephants haveDNA.
  3. All birds have feathers and robins are birds, so robins have feathers.
  4. Red meat has iron in it and beef is red meat, so beef has iron in it.
  5. John is an excellent swimmer. John’s family has a swimming pool. John’s sister Mary must also be an excellent swimmer.
  6. Ray is a football player. All football players weigh more than 170 pounds. Ray weighs more than 170 pounds.

In: Computer Science

The project description: As a programmer, you have been asked to write a Java application, using...

The project description: As a programmer, you have been asked to write a Java application, using OOP concepts, for a Hospital with the following requirements: • The Hospital has several employees and each one of them has an ID (int), name (string), address (string), mobile phone number (string), email (string) and salary (double) with suitable data types. • The employees are divided into: o Administration staff: who have in addition to the previous information their position (string). o Doctor: who have also a rank (string) and specialty (string). The project requirements: • You will need to create all the needed Java classes with all the required information. • You have to apply all the OOP (Object Oriented Programming) concepts that we have covered in this module (i.e. inheritance, polymorphism, interface and collections) • Include a Microsoft Word document (name it as readme.doc) that includes several screenshots of your Netbeans IDE application GUI interface as well as the output screenshot results. Provide all assumptions that you have made during design and implementation. • Include the whole Netbeans Java project with all source codes. Write as much comments as possible to document your source codes. At the end, you will need to create a testing class (e.g. Hospital.java) with the static main() method with the following requirements: • It must have initial fixed collections of working staff (at least 3 administration staffs and 2 doctors) • The program will print a selection screen where the user can choose the operation he/she wants to perform. The selection screen will be repeated after each selection until the staff type the number 4 to completely exit from the program: 1. Add an administration staff (by providing all her/his information) to the list of all administration staff 2. Add a doctor (by providing all her/his information) to the list of all doctors 3. Print all working staff (remember to differentiate between administration staff and doctors in the output printout 4. Exit the program

In: Computer Science