Write a program that reads customers information

Assignment Help JAVA Programming
Reference no: EM131590628

Topics

2-Dimensional Arrays
Classes
Searching
Reading from a file

Coding Guidelines:
• Give identifiers semantic meaning and make them easy to read (examples numStudents, grossPay, etc).
• Keep identifiers to a reasonably short length.
• User upper case for constants. Use title case (first letter is upper case) for classes. Use lower case with uppercase word separators for all other identifiers (variables, methods, objects).
• Use tabs or spaces to indent code within blocks (code surrounded by braces). This includes classes, methods, and code associated with ifs, switches and loops. Be consistent with the number of spaces or tabs that you use to indent.
• Use white space to make your program more readable.

Part #1: Written Exercises (0 pts)
None.

Part #2 - Programming (20 pts)
Write a program that reads customers' information from a file, and creates a movie theatre seating with a number of rows and columns specified by a user. Then it will attempt to assign each customer to a seat in a movie theatre.

You will be creating a class called MovieSeating. This class should be defined in a file named MovieSeating.java. The class MovieSeating will contain a 2 dimensional array called seating of Customer objects as its in- stance variable.

We will be using the following files. These ftles are complete. Download the following files (available on Blackboard) and use them for this assignment (do not change the content of the following files).
• Assignment7.java
• Customer.java
• CustomerData.java

The last file is an input file (text file) that will be read from the Assignment7 class. Save all of the files in the same folder.

The class MovieSeating must include the following constructor and methods. (If your class does not contain any of the following methods, points will be deducted.)

• public MovieSeating(int rowNum, int columnNum) - It instantiates a two dimensional array of the size rowNum by columnNum specified by the parameters. Then it initializes each customer element of this array using the constructor of the class Customer without any parameter. So each customer will have default values for its instance variables.
• private Customer getCustomerAt(int row, int col) - It returns a customer at the indexes row
and col (specified by the parameters of this method) of the array seating.
• public boolean assignCustomerAt(int row, int col, Customer tempCustomer) - The method attempts to assign tempCustomer to the seat at row and col (specified by the parameters of this method). If the seat has a default customer, i.e., a customer with the last name "???" and the first name "???", then we can assign the new customer tempCustomer to that seat and the method returns true. Otherwise, this seat is considered to be taken by someone else, the method does not assign the customer and returns false.
• public boolean checkBoundaries(int row, int col) - The method checks if the parameters row and col are valid. If at least one of the parameters row or col is less than 0 or larger than the last index of the array (note that the size of rows and columns can be different), then it returns false. Otherwise it returns true.
• public String toString() - Returns a String containing information of the seating. It should show the list of customers assigned to the seating using the toString method of the class Customer (it shows initials of each customer) and the following format:

The current seating
--------------------
C.B. ?.?. E.P.
?.?. ?.?. G.B.
B.C. H.C. ?.?.

Attachment:- Java Assignment.rar

Reference no: EM131590628

Questions Cloud

Present the diagram in way that is appropriate to workplace : Present the diagram in way that is appropriate to the workplace. Present the document in a way that is appropriate to the workplace.
Angular acceleration-expressed in standard units : What are the angular displacement of the blades during the acceleration, expressed in revolutions, and the angular acceleration, expressed in standard units?
Call provisions typically require bond issuers : Call provisions typically require bond issuers to pay investors an amount greater than the par value, called. A convertible bond gives.
Define important theme of being a free people : When considering minimum standards, and levels of preparedness I believe that in keeping with America's very important theme of being a free people
Write a program that reads customers information : CSE110 - Write a program that reads customers' information from a file, and creates a movie theatre seating with a number of rows and columns specified
Two frequency knobs on the function : What setting for the two frequency knobs on the function generator would give a signal with a frequency of 4000 Hz?
How is requirements analysis for e-commerce development : Requirements analysis is a vital part of any software development effort, but the requirements planning for an e-commerce development project has tentacles.
Application of specific theory to your studys focus : Write a 1-page paper addressing the sections below of the research proposal:Application of specific Theory to Your Study's/Project's Focus.
Minimum frequency of a waveform : If TIME/DIV is set to 1 second, what is the minimum frequency of a waveform that could be fully displayed on the screen?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

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