Reference no: EM13282718
Algorithm Analysis with Advanced Data Structures,
Your good friend, a Rock Star, asked you to create a Time Manager app for him
The Rock Star performs gigs at certain dates, all around the country - at most one gig per day
His memory is poor, though – he often forgets if (and where) he is supposed to play on a certain date
After confirming he has a gig at a certain night, the Rock Star often wants to know when and where the next performance will be
Write a program cmsc401.java that
receives a sequence of commands (from 1 up to 10000 commands)
a command can be one of:
1 - an insert – add the date and city to “gig plan”
2 - a ‘date’ query – check if there’s a gig planned at a certain
date (and if yes, which city)
3 - a ‘next gig’ query – for the gig found using most recent
“command 2”, check when and where the next performance is
4 – end of sequence of commands, quit the program the sequence of commands always ends with Command 4
Command 3 always is preceded immediately by Command 2
Command 3 is given only if Command 2 returned data & city (that is, there was a gig planed at a queried date)
the sequence of commands is presented at standard input,
each line is a new command
format of the commands and responses to them:
1 - insert a gig,
input format is “1 YYYYMMDD STRING”, no output
YYYYMMDD represents the date – date can by anything in the 21st century
STRING represents the city and is up to 10 characters in length
2 – a ‘date’ query,
input format is “2 YYYYMMDD”,
output format is “YYYYMMDD STRING” if there is a gig on that date, or
“YYYYMMDD NO GIG” if not3 – a ‘next gig’ query
input format is “3”
output format is data and place of next gig: “YYYYMMDD STRING”,
or “NO NEXT GIG” if there’s no next gig in database
4 – quit
input format is “4”, no output, program exits
Use Standard I/O to read input and write the result
In Java, it’s System.in for input, System.out for output
How is the external environment analyzed
: How is the external environment analyzed? External environmental analysis is the process of identifying and monitoring the environment in which a client exists and the opportunities and threats that are present.
|
Explain what mass (g) of nf3 can be produced
: N2(g)+3F2(g)-->2NF3(g). If 1.7 g of nitrogen and an excess of fluorine is used in the reaction, what mass (g) of NF3 can be produced
|
How much thermal energy is created
: A 1200 crate slides 15 down a ramp that makes an angle of 30 with the horizontal. how much thermal energy is created
|
Determine the fundamental period and time of signal
: For each of the following signals, determine whether it isperiodic; if it is, determine its fundamental (i.e., smallest) period T0 and fundamental frequency f0. (a) x(t) =sin2(2t) (b) x(t) =cos(√3t) +sin(2t)
|
Algorithm analysis with advanced data structures
: Algorithm Analysis with Advanced Data Structures, Your good friend, a Rock Star, asked you to create a Time Manager app for him, The Rock Star performs gigs at certain dates, all around the country - at most one gig per day
|
Explain how many moles of sodium ions are contained
: How many moles of sodium ions are contained in a 100.4 g sample of sodium sulfate, Na2SO4? Round to one decimal place.
|
What is the change in thermal energy of the seat of her pant
: A 22 child slides down a 2.4 -high playground slide. She starts from rest, and her speed at the bottom is 1.9 What is the change in thermal energy of the seat of her pants
|
For what fraction of acycle does each diode conduct
: A half-wave rectifier circuit with a 1-Kwload operates from a 12-v(rms) 60-Hz household a 5-to 1 transformer having a center-tappedsecondary winding. It use two silicon diodes that can be modeled tohave a 0.7-v drop for all currents.
|
Explain the absorption of the standard solution
: This results in the formation of the highly colored FeSCN2+ complex ion. To do this analysis, a standard solution containing 5.00x10^-5 M Fe3+ was prepared. After addition of excess SCN-, the absorption of the standard solution =0.363 at 580 nm.
|