Help with this question,please! Cannot use array...

Java program,just can use the things before we learned to array.

Page 1 of 1

5 Replies - 911 Views - Last Post: 26 April 2009 - 09:28 AM Rate Topic: -----

#1 Guest_Nashkyle*


Reputation:

Help with this question,please! Cannot use array...

Post icon  Posted 26 April 2009 - 03:19 AM

• Use of Java API classes (Scanner, etc)
• Use of basic control structures (decisions and loops)
• Design object oriented solutions to simple problems using multiple user-defined classes
• Create and test programming solutions
NOTE 1: JAVA code should be readable and maintainable and follow the style recommended in the
prescribed text book. A Java Coding Standards document that summarises the key
coding standards is provided on the MUSO/Moodle site under the unit’s resources.
NOTE 2: Do not use “arrays” for this assignment.

NOTE 3: You must make the program modular; in other words, your program must be designed with
task-specific methods – you are not to put everything into main().

Many students like to relax by attending sporting events, concerts and stand-up comedy gigs. You are
required to write a portion of the software required for a basic ticket purchasing system for a company
called MyTickets. The system will be installed at MyTickets outlets which are located in various
shopping centres. The system has a number of elements that MUST be included; however you can
feel free to expand the system by tackling some of the extra functionality suggestions.


Description of Business:
Concert/Sports Ticketing Company
MyTickets is a company that sells tickets to sporting events, music gigs and other stage related
concerts. The company acts on behalf of the individual organisations that are running the events, by
providing a convenient system for people to buy tickets. When a customer purchases through
MyTickets, they actually pay an amount that covers the price of the tickets plus an additional “booking
fee” of $1.00 per ticket. The amount paid for the price of the tickets is passed on by MyTickets to the
organisations that run the events, while MyTickets keeps the “booking fee” as its revenue. For each
customer purchase, the customer can buy up to 20 tickets for a single event.
The information recorded by the system for each purchase will include:
• The name of the event
• The organisation running the event
• The date/time of the event
• The price per ticket
• The booking fee per ticket
• The number of tickets sold
The system will ask for the details of up to 3 purchases to be entered, and then will allow the user to
display informational reports about the data entered by the user. The reports which the system should
produce include:
• A list of the total cost of each purchase
• Details of each event for which tickets were sold
• Details of the total profit made from each purchase
Program Structure
Your program should consist of the following classes:
• Purchase class, which manages the purchase. It stores details of each purchase.
• MyTicketApplication class, which contains the main method, which will instantiate up to 3
Purchase objects and displays the menu of options.
• PurchaseDriver class, which will test the methods of the Purchase class.

how to do a program like the description like this?

Is This A Good Question/Topic? 0

Replies To: Help with this question,please! Cannot use array...

#2 NuclearPeon  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 27
  • Joined: 08-January 09

Re: Help with this question,please! Cannot use array...

Posted 26 April 2009 - 04:45 AM

What exactly are you asking for? We won't do your homework for you. Give us something we can work with; if you don't know how to even start programming that, then perhaps you shouldn't be taking that class.

The first step to making a program like the description is to create objects that reflect the program.
Was This Post Helpful? 0
  • +
  • -

#3 Guest_Nashkyle*


Reputation:

Re: Help with this question,please! Cannot use array...

Posted 26 April 2009 - 05:18 AM

View PostNuclearPeon, on 26 Apr, 2009 - 03:45 AM, said:

What exactly are you asking for? We won't do your homework for you. Give us something we can work with; if you don't know how to even start programming that, then perhaps you shouldn't be taking that class.

The first step to making a program like the description is to create objects that reflect the program.


I do not understand what question ask me to do ... I think I need a sample output, so I can figure out what I should program.
Was This Post Helpful? 0

#4 baavgai  Icon User is online

  • Dreaming Coder
  • member icon

Reputation: 5941
  • View blog
  • Posts: 12,870
  • Joined: 16-October 07

Re: Help with this question,please! Cannot use array...

Posted 26 April 2009 - 05:40 AM

The requirements are clearly spelled out.

It does strangely omit the customer from the purchase. I would probably use more classes than the three spelled out.

Here's what one might look like.

//Purchase class, which manages the purchase. It stores details of each purchase.
class Purchase {
	// The name of the event
	private String eventName;

	// The organisation running the event
	// The date/time of the event
	// The price per ticket
	// The booking fee per ticket
	// The number of tickets sold
	
	// presumably you'll set all values in the constructor
	public Purchase( String eventName /* ... */) {
		this.eventName = eventName;
	}
	
	public String getEventName() { return this.eventName; }
	
	public double getTotalCost() { /* your code here */ }
}



If you've been given this assignment, it's assumed you have some clue what you're doing. This really isn't a first assignment. If you've just been sliding by so far, you're probably screwed.
Was This Post Helpful? 1
  • +
  • -

#5 Guest_Nashkyle*


Reputation:

Re: Help with this question,please! Cannot use array...

Posted 26 April 2009 - 08:07 AM

View Postbaavgai, on 26 Apr, 2009 - 04:40 AM, said:

The requirements are clearly spelled out.

It does strangely omit the customer from the purchase. I would probably use more classes than the three spelled out.

Here's what one might look like.

//Purchase class, which manages the purchase. It stores details of each purchase.
class Purchase {
	// The name of the event
	private String eventName;

	// The organisation running the event
	// The date/time of the event
	// The price per ticket
	// The booking fee per ticket
	// The number of tickets sold
	
	// presumably you'll set all values in the constructor
	public Purchase( String eventName /* ... */) {
		this.eventName = eventName;
	}
	
	public String getEventName() { return this.eventName; }
	
	public double getTotalCost() { /* your code here */ }
}



If you've been given this assignment, it's assumed you have some clue what you're doing. This really isn't a first assignment. If you've just been sliding by so far, you're probably screwed.

Wow, thanks for help. This codes make sense to me !!! XD
Was This Post Helpful? 0

#6 Pwn  Icon User is offline

  • D.I.C Regular

Reputation: 19
  • View blog
  • Posts: 458
  • Joined: 25-November 07

Re: Help with this question,please! Cannot use array...

Posted 26 April 2009 - 09:28 AM

Was that sarcasm?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1