in java What object is passed to the start method in a JavaFX program? What should you do with it?
In: Computer Science
Do you have a wireless network at home? What kind of wireless equipment do you have? Is your wireless network encrypted? If so, what level of encryption and other security options are you utilizing? If not, how can you take care of protecting your network?
In: Computer Science
Draw an EER that models the given requirements.
Consider modeling a bank:
In: Computer Science
i have a skeleton class and i have to fill some methods of this class. i am having difficulties especially with the findAppointment method. so this is the problem.
Implement a superclass Appointment and subclasses OneTime,
Daily, and Monthly. An Appointment has a description (for example
“see the dentist”) and a date. Write a method occursOn(int year,
int month, int day) that checks whether the appointment occurs on
that date. For example, for a monthly appointment, you must check
whether the day of the month matches. You must write: •
Appointment.java • Daily.java • Monthly.java • OneTime.java
You need to write AppointmentBook.java file – a skeleton and a
sample run of the program is given to you. This file has a main
method
I have done all the first part. the appointment, monthly, daily, OneTime. they work fine. the appointmentBook i havent finished. here is the skeleton. please use ArrayList and i want it in java.
**************AppointmentBook******************.
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
Build on the Appointment hierarchy.
Give the user the option to add new appointments.
The user must specify the type of the appointment and
description, and then, if required, the day or date.
*/
public class AppointmentBook
{ ................ }
/**
Adds a new Appointment object based on user input.
@param in the Scanner to read from.
*/
public void addAppointment(Scanner in)
{ ......................
}
/**
Method to print all appointments on a certain date.
@param in the Scanner to read from.
*/ public void findAppointments(Scanner in)
{ .....................}
// Just to test the appointment book
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
AppointmentBook ab = new AppointmentBook();
System.out.println("Welcome to the Appointment Book");
System.out.println("-------------------------------");
boolean done = false;
while (!done)
{
System.out.print("Appointments: (F)ind, (A)dd, or (Q)uit: ");
String choice = in.next();
if (choice.equals("F") || choice.equals("f"))
{
ab.findAppointments(new Scanner(System.in));
}
else if (choice.equals("A") || choice.equals("a"))
{
ab.addAppointment(new Scanner(System.in));
}
done = choice.equals("Q") || choice.equals("q");
}
System.out.println("Good bye. Have a nice day!");
in.close();
}
}
***********this is the output*********
Welcome to the Appointment Book
-------------------------------
Appointments: (F)ind, (A)dd, or (Q)uit: A
Enter type [(D)aily, (M)onthly, (O)netime] and description: D
Exercise
Appointments: (F)ind, (A)dd, or (Q)uit: A
Enter type [(D)aily, (M)onthly, (O)netime] and description: D Eat
dinner
Appointments: (F)ind, (A)dd, or (Q)uit: A
Enter type [(D)aily, (M)onthly, (O)netime] and description: M Pay
Bills
Enter the day of the appointment: 1
Appointments: (F)ind, (A)dd, or (Q)uit: A
Enter type [(D)aily, (M)onthly, (O)netime] and description: M Pay
Rent
Enter the day of the appointment: 10
Appointments: (F)ind, (A)dd, or (Q)uit: A
Enter type [(D)aily, (M)onthly, (O)netime] and description: O Visit
Patagonia
Enter the date of the appointment (mm dd yyyy) : 12 01 2020
Appointments: (F)ind, (A)dd, or (Q)uit: a
Enter type [(D)aily, (M)onthly, (O)netime] and description: O Visit
Norway
Enter the date of the appointment (mm dd yyyy) : 07 01 2020
Appointments: (F)ind, (A)dd, or (Q)uit: F
Enter the date (mm, dd, yyyy) to search: 09 10 2019
Exercise
Eat dinner
Pay Rent
Appointments: (F)ind, (A)dd, or (Q)uit: F
Enter the date (mm, dd, yyyy) to search: 07 01 2020
Exercise
Eat dinner
Pay Bills
Visit Norway
Appointments: (F)ind, (A)dd, or (Q)uit: f
Enter the date (mm, dd, yyyy) to search: 12 01 2020
Exercise
Eat dinner
Pay Bills
Visit Patagonia
Appointments: (F)ind, (A)dd, or (Q)uit: q
Good bye. Have a nice day!
In: Computer Science
PYTHON CODE
Step one: Copy and paste these lyrics into a multistring line
"Do you ever feel like a plastic bag
Drifting through the wind
Wanting to start again?
Do you ever feel, feel so paper-thin
Like a house of cards, one blow from caving in?
Do you ever feel already buried deep
Six feet under screams but no one seems to hear a thing
Do you know that there's still a chance for you
'Cause there's a spark in you?
You just gotta ignite the light and let it shine
Just own the night like the 4th of July
'Cause, baby, you're a firework
Come on, show 'em what you're worth
Make 'em go, "Ah, ah, ah"
As you shoot across the sky
Baby, you're a firework
Come on, let your colors burst
Make 'em go, "Ah, ah, ah"
You're gonna leave 'em all in awe, awe, awe
You don't have to feel like a wasted space
You're original, cannot be replaced
If you only knew what the future holds
After a hurricane comes a rainbow
Maybe a reason why all the doors are closed
So you could open one that leads you to the perfect road
Like a lightning bolt your heart will glow
And when it's time you'll know
You just gotta ignite the light and let it shine
Just own the night like the 4th of July
'Cause, baby, you're a firework
Come on, show 'em what you're worth
Make 'em go, "Ah, ah, ah"
As you shoot across the sky
Baby, you're a firework
Come on, let your colors burst
Make 'em go, "Ah, ah, ah"
You're gonna leave 'em all in awe, awe, awe
Boom, boom, boom
Even brighter than the moon, moon, moon
It's always been inside of you, you, you
And now it's time to let it through, -ough, -ough
'Cause, baby, you're a firework
Come on, show 'em what you're worth
Make 'em go, "Ah, ah, ah"
As you shoot across the sky
Baby, you're a firework
Come on, let your colors burst
Make 'em go, "Ah, ah, ah"
You're gonna leave 'em all in awe, awe, awe
Boom, boom, boom
Even brighter than the moon, moon, moon
Boom, boom, boom
Even brighter than the moon, moon, moon"
Step two: Then display and record the following statistics...
In: Computer Science
Urgent Please
Explain and show the difference between IEEE 16, 32, 64, 128-bit floating-point numbers.
In: Computer Science
String search
Describe the brute force solution to counting the number of times the letter “a” occurs in a text.
Outline a divide-and-conquer algorithm for counting the number of times the letter “a” occurs in a text.
Analyze each approach and compare the efficiencies.
In: Computer Science
If you want to do live streaming on a computer, what are hardware components that you will need? What software will you need to use to record and stream?
I want to get a PS5 so I can play Baka matai karaoke in Yakuza. Wait, that’s on the XBox now??? Dang it. What resolution TV should I get to ensure I get the best picture quality?
In: Computer Science
Counting integers greater than 10
Write the pseudo-code for a brute force approach to counting the number of integers greater than 10 in an array of n integers.
Write the pseudo-code divide-and-conquer algorithm for counting the number of integers greater than 10 in an array of n integers.
Give the recurrence relation for the number of comparisons in your divide-and-conquer algorithm in part b.
In: Computer Science
Counting evens
Write the pseudo-code for a brute force approach to counting the number of even integers in an array of n integers.
Write the pseudo-code divide-and-conquer algorithm for counting the number of even integers in an array of n integers.
Give the recurrence relation for the number of additions in your divide-and-conquer algorithm.
In: Computer Science
Assignment problem.
Give a small example of an assignment problem statement.
Outline an algorithm for solving the assignment problem.
Is your algorithm polynomial? Explain.
In: Computer Science
Using PowerShell ISE or VSCode, create a PowerShell script that will do the following:
You are going to create an HTML web page report from a standard processed report. You will use the text file “STUDENTS.TXT” located on Canvas.
The script must meet the following requirements:
In: Computer Science
1) Discuss portability as a special case of reusability
2) Discuss the quality requirements in Information Systems for Healthcare Management
In: Computer Science
The following sentences and paragraphs highlight some of the problems you learned about in this chapter. Use what you have learned to rewrite + examples to make them clear and readable. 1. From a one-page notice informing employees which machines they can use in a training facility: Employees should be well advised that they should use only the first row of machines the HP PCs. All other machines are used only for classes for training new users. If an employee doesn't do this, he will be asked to leave the training room. From an email message sent to all employees of a law firm advising them to be alert for a new virus: This virus has been known to cause the destruction of files, and it is very important that you perform a search of your hard drive to try and attempt eradication of it using the search feature. Search for EDT file extensions and delete them. Then the problem will be solved. 3. From an instruction sheet that will be handed out during a training session on a new email package; this passage explains the capabilities of the package to users who have never used email before: Email messages are stored on a central server, and you download it every time you open one, in effect. You can save it to a local disk if you want to keep it. From a booklet that a user support department will distribute to employees of an insurance organization to explain the capabilities of a new software claims management package: This is a new type of CMS (claims management software) that every adjuster, regardless of his level, will benefit from, greatly. This claims management software a (1) organize claims information, (2) be used while you are on the telephone, (3) do reports by claim type, and (4) for generation of summary claims information.
In: Computer Science
insert code in all TODO part, it's about pointer. atmel studio 7.0. this should be able to run without utilities.h
// includes
#include <asf.h>
// function prototypes
// these are necessary if you are going to call a function before
it is declared
// without these, we would have to put all of our functions above
main
static void configure_console(void);
void get_matrix(int *matrix);
int calc_det(int *matrix);
void get_matrix_global(void);
// declare global variables
int matrix_global[9];
int main (void)
{
// configure system
board_init();
sysclk_init();
configure_console();
printf("\nStarting Determinant Calculator\r\n\n");
// declare constants
const int NUM_METHODS = 3;
// declare button variables
bool prev_button_state = BUTTON_0_INACTIVE;
bool current_button_state = BUTTON_0_INACTIVE;
// create a fixed-sized int array with 9 elements and
initialize elements to 0
// name = matrix_array
/***TODO - 1 line***/
// create an int pointer and point it to NULL
// name = matrix_dynamic
/***TODO - 1 line***/
// create an int pointer and point it to NULL
// name = matrix
/***TODO - 1 line***/
// create a variable to keep up with what method to
run
int method = 0;
// create a variable for the determinant that you
calculate
int det = 0;
while (1)
{
// typical edge detection for
button
current_button_state =
ioport_get_pin_level(BUTTON_0_PIN);
if ( (current_button_state ==
BUTTON_0_ACTIVE) && (prev_button_state ==
BUTTON_0_INACTIVE))
{
// Method 0:
Pass matrix_array into get_matrix
if((method %
NUM_METHODS) == 0)
{
printf("Method 0: Pass matrix_array into
get_matrix\r\n");
// use get_matrix to get a 3x3 matrix from the
user
// pass in matrix_array so that it can be
updated with user data
/***TODO - 1 line***/
// point matrix to matrix_array
/***TODO - 1 line***/
}
// Method 1:
Update a global array with user input
else if((method
% NUM_METHODS) == 1)
{
printf("Method 1: Update a global array with
user input\r\n");
// use get_matrix_global to get a 3x3 matrix
from the user
// no arguments are passed in, as this function
just updates
// the global matrix, matrix_global
/***TODO - 1 line***/
// point matrix to matrix_global
/***TODO - 1 line***/
}
// Method 2:
Dynamically allocate an array using malloc
else if((method
% NUM_METHODS) == 2)
{
printf("Method 2: Dynamically allocate an array
using malloc\r\n");
// use malloc to dynamically allocate an array
that can hold 9 integer values
// this allocates the array on the heap, and it
must be freed once we are done
// with it, or else we will have a memory
leak
/***TODO - 1 line***/
// pass in matrix_dynamic to get_matrix so that
it can be updated with user data
/***TODO - 1 line ***/
// point matrix to matrix_dynamic
/***TODO - 1 line ***/
}
// calculate the
determinant of the matrix
/***TODO - 1
line***/
// print
calculated determinant value
printf("\r\n ***
Determinant = %d\r\n\r\n", det);
// free
matrix_dynamic if necessary
/***TODO -
multiple lines ***/
// increment
method so that it uses the next method
method++;
}
}
}
// typical configure_console
static void configure_console(void)
{
const usart_serial_options_t uart_serial_options
=
{
.baudrate =
CONF_UART_BAUDRATE,
.charlength =
CONF_UART_CHAR_LENGTH,
.paritytype =
CONF_UART_PARITY,
.stopbits =
CONF_UART_STOP_BITS,
};
/* Configure console. */
stdio_serial_init(CONF_UART,
&uart_serial_options);
}
// get a 3x3 matrix from user input and store it in the
// matrix that was passed into the function
// note that I could've made the parameter be
// int matrix[9] and it would do the same thing
void get_matrix(int *matrix)
{
unsigned char n;
printf("Please press any key, then enter a 3x3
matrix\r\n");
// press any key to start
// usart_serial_getchar waits for one character from
Putty
usart_serial_getchar((Usart *)CONF_UART,
&n);
// now get the 9 elements of the matrix
for(int i=0; i<9; ++i)
{
printf("Element %d: ", i);
usart_serial_getchar((Usart
*)CONF_UART, &n);
// convert the ascii character from
Putty to an integer
matrix[i] = (int) n - '0';
// reflect the value back to
Putty
printf("%d\r\n", matrix[i]);
}
printf("Matrix entry complete\r\n");
}
// get a 3x3 matrix from user input and store it in the
// global matrix that was declare in the global namespace
void get_matrix_global(void)
{
unsigned char n;
printf("Please press any key, then enter a 3x3
matrix\r\n");
// press any key to start
// usart_serial_getchar waits for one character from
Putty
usart_serial_getchar((Usart *)CONF_UART,
&n);
// now get the 9 elements of the matrix
for(int i=0; i<9; ++i)
{
printf("Element %d: ", i);
usart_serial_getchar((Usart
*)CONF_UART, &n);
// convert the ascii character from
Putty to an integer
matrix_global[i] = (int) n -
'0';
// reflect the value back to
Putty
printf("%d\r\n",
matrix_global[i]);
}
printf("Matrix entry complete\r\n");
}
// calculate the determinant of a 3x3 matrix and return the
value
int calc_det(int matrix[9])
{
int cof1 =
matrix[0]*(matrix[4]*matrix[8]-matrix[5]*matrix[7]);
int cof2 =
matrix[1]*(matrix[3]*matrix[8]-matrix[5]*matrix[6]);
int cof3 =
matrix[2]*(matrix[3]*matrix[7]-matrix[4]*matrix[6]);
int det = cof1 - cof2 + cof3;
return det;
}
In: Computer Science