Algorithm analysis with advanced data structures

Assignment Help JAVA Programming
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

Reference no: EM13282718

Questions Cloud

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.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Determine the decision of java

Determine the decision of Java as the platform to develop this program. Identify the Java-based technologies utilized in this project and analyze each of them. Then, provide discussion on the purpose of each of the Java-based technologies utiliz..

  Implements both the quicksort and mergesort algorithms

Write a program that correctly implements both the Quicksort and Mergesort algorithms. The program should generate an array of 500 random numbers in the 1-100 range. The program should sort the same set of numbers and keep time stamps of how long it ..

  Write java program to find calories-conditional operator

Write down the answer for this program? Write down Java program (use Conditional (? Operator) which suggests number of calories a person must eat each day.

  Create a class named blooddata

Create a class named BloodData that includes fields that hold a blood type (the four blood types are O, A, B, and AB) and an Rh factor

  What value would be returned from call to its size() method

If a collection stores 5 objects, what value would be returned from a call to its size() method?

  Implementation of memory management

Implementation of memory management

  On any given execution your program

On any given execution your program will produce just one version of the figure. However, you should refer to the class constant throughout your code, so that by simply changing your constant's value and recompiling, your program would produce a f..

  Displays the number of days in a month

Create a program that displays the number of days in a month. Use a 12-element one-dimensional array to store the number of days in each month (use 28 for the number of days in February).

  Write an interface for a bagadt that implements iterable

Write an interface for a BagADT that implements the Iterable interface. Include javadoc comments that will generate specifications for the BagADT so that someone who wants to implement this interface will know what each method does.

  Simulate some people catching fish in a lake in java program

In this project, you will simulate some people catching fish in a lake. The purpose of the assignment is to get used to using Arrays as well as getting more experience in having objects interact together.

  Java program to find solution of cryptarithmetic puzzle

A solution to puzzle is S=9, R=8, O=0, M=1, Y=2, E=5, N=6, D=7. Write down a java program which finds solution to cryptarithmetic puzzle of: TOO + TOO + TOO + TOO = GOOD.

  Create a gui version of the game mini sudoku.

Each row has the numbers 1 to 6,Each column has the numbers 1 to 6,Each group of 2 rows by 3 columns also has the numbers 1 to 6.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd