Posts

Showing posts from March, 2016

Washing Machine Controller GUI in Java programming - Flinders University

Image
Washing Machine Task Write a Java program that simulates a washing machine. The graphical user interface consists of two parts: the control panel for setting up washing conditions and the drawing panel for simulating the turbo movement when the machine starts. Note: the example GUI is to illustrate the key interface components rather than suggesting this is the only interface that everyone should stick to. You are encouraged to come up with your own design. Level 1: Appearance and layout Think about appropriate fonts and colours for the labels and the display. Also spend some time on background colours, borders, and the shape of buttons. Work out a layout that resembles a washing machine control panel. Washing machines usually have different interfaces, but they share some common components. You are also encouraged to design a novel interface that you could possibly justify. You may use any number of panels and any layout managers. Level 2: Event handling The toggle “ON/OFF” button tur

Passenger Seats Assigning Program full implementation in C++ - HJ Soft

Image
Description: Write a C++ program to assign passenger seats in an airplane. Chesapeake Airlines is a small commuter airline with seats for 36 passengers in 9 rows of 4 seats each. See the sample display below for a layout of the plane. The user enters the row (1 – 9) and the seat (A – D). The program checks the array to see if the seat is available. An X in the array indicates the seat is not available. If the seat is available, assign an X to that position in the array. If it’s unavailable, display a message to the passenger. There are 3 ticket classes: Row 1 = First Class Rows 2-4 = Business Class Rows 5-9 = Coach *Note that the rows are 0-8 in the C++ program. Use the classCtr array supplied in the header file to keep track of how many seats in each class are purchased. Continue processing requests until the user enters -1 for the row. After -1 is entered for the row, display number of seats sold. percentage occupied. sales report. You need to include the following functions in your

Circle Class - Area, Diameter, Circumference, Radius Implementation in C++ - HJ Soft

Image
Project Specifications  Write a C++ program that will use a class called Circle that has the following member variables: radius: a float pi: a float initialized with the value 3.14159. The class should have the following member functions: constructor - sets the radius value = 0.0. setRadius - a mutator function for the radius variable. getRadius - an accessor function for the radius variable. getArea - returns the area of a circle, which is calculated as: area = pi * radius * radius getDiameter - returns the diameter of a circle, which is calculated as: diameter = radius * 2 getCircumference - returns the circumference of the circle, which is calculated as circumference = 2 * pi * radius Write a program that demonstrates the Circle class by asking the user for the circle's radius, creating a Circle object, and then reporting the circle's area, diameter, and circumference with 2 decimal places each. Output Screenshot Buy now CONTACT DETAILS For any other questions or other tasks

Social Circles, Friend Finder Algorithm in Java full implementation

Description Read a list of friend relations A-B, A-D, C-A, C-D, ..., and determine friendship circles. 2 Problem Statement These days, it seems that we expect computers to direct our social lives, even to the point of choosing our friends. Of course, as programmers, we get to implement these choice algorithms, as in this problem. Given a \friend relation" { a set of pairs of people who designate each other as \friends" { and a particular person (C, \the client") your algorithm is to select any speci ed number (N) of people who are not friends of C, but who are friends of friends of C. Speci cally, the algorithm picks those people who know the greatest numbers of C's friends. For example, if N = 2, C is Jack, and the friend relation is Jack/Mary Mary/Claire Jack/Tom Tom/Claire Jack/Richard Tod/Richard Claire/Richard Jack/Jill Jill/June June/Tod Jill/Tod Jill/Peter Mary/Tom Richard/Tom Jill/Tom the program would select Claire (who knows Jack's friends Mary, Tom, an

Time Stamp Algorithm with tow different schedules complete solution - CSc 630 Spring 2016

Image
Introduction Answer the following questions from your textbook. You may submit in any format that is neat and readable. Electronic submissions (no required) are to be submitted using D2L on or before the due date. Chapter 21, page 809, exercises 21.25 and 21.26. Explanation Use the following information for both questions: Let us assume a clock with linear time points 0, 1, 2, 3... and that the original read and write timestamps of all items are 0 (without loss of generality). read_TS(X) = read_TS(Y) = read_TS(Z) = 0 write_TS(X) = write_TS(Y) = write_TS(Z) = 0 The two schedules can be written as follows in shorthand notation: SE: r2(Z); r2(Y); w2(Y); r3(Y); r3(Z); r1(X); w1(X); w3(Y); w3(Z); r2(X); r1(Y); w1(Y); w2(X); 1 2 3 4 5 6 7 8 9 10 11 12 13 SF: r3(Y); r3(Z); r1(X); w1(X); w3(Y); w3(Z); r2(Z); r1(Y); w1(Y); r2(Y); w2(Y); r2(X);w2(X); 1 2 3 4 5 6 7 8 9 10 11 12 13 Assume that each operation takes one time unit, so that the numbers under the operations indicate the time when each

Assignment 4 – Priority Queue Implementation in C++ with full source code

Description: Implement a priority queue capable of determining what order a list of people should be served given a numeric value. The highest priority should be given to persons with larger values (ordered largest to smallest). The priority queue should be written using a C++ class, named PQueue, and the queue itself should be implemented as a linked list similar to how we implemented queues/stacks in lecture. The following classes should be defined by your program: class Person : Used to store information about each person class PQueue : Priority queue used to serve people The following public functions need to be implemented: Person::Person( int, string ) : Initialize the person PQueue::PQueue( void ) : Initialize the priority queue bool PQueue::empty( void ) : Test whether queue is empty int PQueue::size( void ) : Return size Person* PQueue::front( void ) : Access next node Person* PQueue::back( void ) : Access last node void PQueue::enqueue( Person* ) : Insert node void PQueue::de

IT540Assignment3 Solution - Organization Access Database with queries

Write SQL statements (queries) to answer the following questions (Make sure to replace XXX with your initials!): 1. Write an SQL statement to list all columns and all rows for the table Service. Save the query results as XXXQ1. 2. Write an SQL statement to list LastName, FirstName, and CellPhone for all employees having an experience level of Master. Save the query results as XXXQ2 3. Write an SQL statement to list the names of employees who have worked on a property in New York. Use a subquery. Save the query results as XXXQ3. 4. Answer question 3 but use a join. Save the query results as XXXQ4. 5. Write an SQL statement to list the names of employees who have worked on a property owned by a corporation. You can use either subquery or join for this question. Save the query results as XXXQ5. 6. Write an SQL statement to show the first name and sum of hours worked for each employee. Save the query results as XXXQ6. 7. Write an SQL statement to show the sum of hours worked for each Exper

Bank Line Implementation in Java using Multi threading - ITEC 3150, Spring, 2016

Image
Implement a bank line of credit account.  The account will have two primary attributes, the credit limit and current credit balance.  The line of credit class should also contain a lock and a sufficient credit limit condition.  When initialized the current credit balance will be zero.  The credit limit should be determined at construction time.  The owner of the credit line can get money up to the credit limit and make payments until the balance is zero.   If a request is made for money than is available, the credit limit will return up to the limit, but not beyond it.  So the getMoney method should have a return value of how much money is returned. The credit line program should have two threads:  one to get more money from credit line and a second to make payments.  The thread to get more money increases the credit balance up to, but not beyond the credit limit.  The make payment thread decreases the current credit balance.  The make payment thread should make random payments betwee

C++ Project - Binary Search Tree Problems, finding height, number of nodes and BST cloning

Binary Search Tree Implementation + Full Documentation This programming assignment simulates the use and functionality of binary search trees (BST) by comparing statistics over several simulations. Start the random number generator at the current time stamp -- similar or the same as srand(time(0)). Initialize variables to be used in the program’s final report. Define a struct node with four fields: node * left, * right; int data; and int frequency. Frequency means the number of times the specific data value was placed into the tree. So, instead of having a BST with the same data values, count the number of times (more than zero) that the data value was placed into the tree. Run the following 1000 times: Start with an empty binary search tree. Load 5000 integers with values between 0 and 1023 into the BST. Without changing that tree (Call it T1, here), create another empty BST, say T2 and load all the data from T1 into T2 in such a way that T2 is “balanced.”  Gather the following three

Pocker Game in C Programming - 300698 Operating Systems Programming (Advanced) – 300943

Image
Buy now Introduction Operating Systems have a need for extremely compact data structures, as often these need to be stored wholly in memory. Examples of this are free memory lists, page tables and disk space bitmaps. This  practical Case Study will refresh your knowledge of bit operations, necessary to manipulate such compact data structures. We will use a simple variant of the card game poker as the inspiration for our compact data structure. In this exercise, you will model a deck of playing cards as a bit 1eld. Only six bits are required to fully describe a card, two for the suit and four for the value. An extra bit as been added to the structure to encode the colour of the card. A second bit 1eld will be used to store the number of pairs contained in a hand. Read this section fully before attempting any of the exercises. These instructions contain some background information, the task to perform, sample code and some system documentation extract. 2 Structure of the bit 1elds 2.1 T

CS 222 Homework Assignment 6 ASCII File I/O

Introduction For this assignment, you will perform basic ASCII file Input and Output. Your program will read a series of questions from an input file, present them to the user, get the user's responses to the questions, and write both the questions and the responses to an output file. Specifications You program will begin by prompting the user to enter two filenames. The first filename will be the input file that contains the questions. The second filename will be the output file where the questions and responses will be written. Once the filenames are known, the program will open the two files, one for input and one for output. Your program will then enter a loop which will read each question from the input file, print the question to the console, and get the user's response to the question from the console. It will then write both the question and response to the output file. Your program will continue to do this until there are no more questions to be read from the input fil

CallAir case study - SQL queries, SQL reports, ERD

Consider the following requirements: Your group is responsible for developing a database to support the fundamental data requirements of a customer call center for an established network service provider (includes landline, mobile and internet (broadband) services) - CallAir.  Due to increased competition in the market, CallAir. Due to increase competition in the market, CallAir is under increasing pressure to remain competitive and to rebuild its waning customer base. In order to do this, CallAir requires a unified view of all its customer data including customer personal information, bill details, marketing preferences, history with the organization providing CallAir with the ability to target customers with the right product/service offers. Requirments The following are the minimum project requirements: You are required to create a REPORT for CallAir documenting the database design and some preliminary results once the database is developed. This should include: 1- Draw an Entity Re