Write program that generate sorted list of rental properties

Assignment Help C/C++ Programming
Reference no: EM131971114

C Programming Lab Assignment -

Programming Exercise - The purpose of this lab is to

  • Demonstrate that you can create and manipulate structures, using pointers.
  • Demonstrate that you can sort an array of structures, using appropriate comparison functions.

Statement of Problem

Write a program (e.g., 'lab4.c') that generates a sorted list of rental properties.

Each property will be implemented as a structure that has members that record the street name, the street number, the number of bedrooms, and the monthly rent.

Using a typedef to simplify naming your struct is a good idea, but not mandatory. You will initialize a 12-element array of these structs. You will provide your own (fictitious) street names and numbers, but will randomly generate the number of bedrooms (1-4) and the rent (800-1200, in one hundred dollar increments). The random numbers must vary each time you run the program. Three of your rental properties must use exactly these addresses ( "24 Sussex Drive", "1 Sussex Drive", and "5 Sussex Drive"), and two of them must exist on another street. All the other properties can exist on their own streets.

You'll need a function to print a summary of each rental property, which will be used to print out lists. This function should use fixed-width columns (as per earlier labs) to make the list is easy to read (i.e., by having the rents for each property all aligned in a single column, ditto for the number of bedrooms). You will then print out the list three times, with the following sorting criteria:

1. Sorted by number of bedrooms, increasing. If there are two or more rental properties with the same number of bedrooms, then those properties will be ordered by the monthly rent, increasing.

2. Sorted by rent, increasing. If there are two or more rental properties with the same monthly rent, then those properties will be ordered by the number of bedrooms, increasing.

3. Sorted by street address, increasing. The sorting is by street name first, then street number (e.g., "5 Sussex Drive" and "24 Sussex Drive" come before "1 Wellington Avenue") You will add an appropriate header before each list, as demonstrated in the following sample output.

Please check that you've satisfied the following submission requirements -

1. Did you make sure that you have a header comment in your source files?

2. Did you confirm that your zipped submission is a ".zip" file (not a '.rar' or '.tar.gz' or '.7z' file)?

3. Did you zip up a folder that includes your user name, and the lab/assignment indicator? I.e., if you open up your own zipped submission, you should see a folder called (for example) "smit9112_L4". If you just see file(s), you've done it wrong, and you'll need to go to the parent folder, and try zipping your lab folder.

4. Did you remove all the unnecessary files from the folder contained in your zipped submission?

I.e., you open up your own zipped submission, and click on the folder called (for example) "smit9112_L4", you should see just your makefile and your source files (e.g., lab4.c).

5. Is your makefile actually called 'makefile' or 'Makefile' (without any filename extensions?)

Attachment:- Assignment File.rar

Reference no: EM131971114

Questions Cloud

Compare and contrast ways that consumer health informatics : Compare and contrast ways that consumer health informatics is changing the way that health advice and care is sought and delivered.
Recalculate unlevered net income : New tax laws allow you to depreciate the? equipment, costing $7.5 million over three rather than five years using? straight-line depreciation.
Today complaining of urinary incontinence : You see a 75 year old female in your clinic today complaining of urinary incontinence. She is otherwise healthy based upon her last visit.
Which assessment finding is most important for the rn : he weighs 55 pounds (25 kilograms), and his body mass index (BMI) is 20.9. Which assessment finding is most important for the RN to address?
Write program that generate sorted list of rental properties : CST8234 - C Programming Lab Assignment - Write a program (e.g., 'lab4.c') that generates a sorted list of rental properties
What is the degree of operating leverage : What is the degree of operating leverage at the accounting break-even point? (Do not round intermediate calculations. Round your answer to 3 decimal places)
Compare and contrast ways that consumer health informatics : Compare and contrast ways that consumer health informatics is changing the way that health advice and care is sought and delivered.
By how much does diversification reduce the var : You are to evaluate a portfolio with a gold position of $300,000 and a $500,000 investment in silver. The daily volatilities of gold and silver are 1.8%.
Important for the rn to address : A 7 year old male is referred to the school clinic because he fainted on the playground. His height is 3 feet, 7 inches (107.5 cm), he weighs 55 pounds

Reviews

len1971114

5/5/2018 1:31:52 AM

Submission - When you are complete submit your programs to Blackboard. But… before you do, please check that you’ve satisfied the above submission requirements If you don’t satisfy submission requirements #2 or #3 you will get ZERO on this lab. If you realize afterwards that you’ve made a mistake, don’t panic! you are allowed to correct your mistake and resubmit.But you ONLY get TWO submissions per lab/assignment, so try to make sure you doublechecked everything before doing your first submission… and only use the second submission in case of emergency.

Write a Review

C/C++ Programming Questions & Answers

  Create program that uses functions and reference parameters

Create program that uses functions and reference parameters, and asks user for the outside temperature.

  Write a program using vectors and iterators

Write a program using vectors and iterators that allows a user to maintain a personal list of DVD titles

  Write the code required to analyse and display the data

Calculate and store the average for each row and column. Determine and store the values for the Average Map.

  Write a webservices application

Write a webservices application that does a simple four function calculator

  Iimplement a client-server of the game

Iimplement a client-server version of the rock-paper-scissors-lizard-Spock game.

  Model-view-controller

Explain Model-View-Controller paradigm

  Design a nested program

How many levels of nesting are there in this design?

  Convert celsius temperatures to fahrenheit temperatures

Write a C++ program that converts Celsius Temperatures to Fahrenheit Temperatures.

  Evaluate and output the value in the given base

Write C program that will input two values from the user that are a Value and a Base with which you will evaluate and output the Value in the given Base.

  Design a base class shape with virtual functions

Design a base class shape with virtual functions

  Implementation of classes

Implementation of classes Chart and BarChart. Class barChart chould display a simple textual representation of the data

  Technical paper: memory management

Technical Paper: Memory Management, The intent of this paper is to provide you with an in depth knowledge of how memory is used in executing, your programs and its critical support for applications.

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