Assignment SpecificaonsGeneral InformaonYou are to develop a rental calculator for the Beachport Village apartments, a small two-building complex of single apartments located in Playa del Rey close to the beach. The complex has two buildings: Shoreline and Wavecrest. The Shoreline building has direct whitewater views of the beach, and is more expensive in which to rent. The rental calculator allows the user to enter a base rent (which would be the rent charged for a standard [default] apartment) and then to select a variety of attributes about an apartment:location (building)
fireplace or not
non-smoking unit or notThe combination of attributes determines the ultimate monthly rent to be paid. Actual rent may be lower than Base Rent due to discounts provided by certain attributes (in this program’s case, just the non-smoking unit).The attributes are to be selected, and then upon pressing of an on-screen Calculate Rent button, the rent is calculated and displayed.You are to develop this program using Visual Basic.
Detailed SpecificaonsA working version of the program (.exe file only) is downloadable. See the link to it above. It is calledbeachportui.exe (stands for Beachport User Interface). This version shows the user interface you shoulduse; the program itself is fully functional.You are to develop a form laid out just like the one in the working version, complete with the same controls,labels, titles and colors. Please be careful of your sizing of the form and controls and the spacing; sizing andspacing should approximate that in the working version.The form should have a fixed single border style (meaning the borders are NOT resizable). Each of theitems in the chart (including building) adds a discrete positive or negative amount onto the base rent.Base rent can be any number. No validation checks are needed for this program. You will assume the user isentering a positive integer value.Building is a combo box (DropDownList style) that has one of the buildings specified above. AssumeWavecrest; it should be the default building which appears in the box upon running the program.6/30/2018 Assignment 5 – Beachport Rental Calculatorhttps://my.uclaextension.edu/courses/11549/assignments/162487?module_item_id=539607 2/4Remember, this is a dropdown list, so the user should not be able to add any value not on the list, nor canthe user “character-edit” any value which appears in the list. Renting in Shoreline adds $140 to the rent.Fireplaces are available in selected units. A $27 per month premium applies. This item should be“unchecked” upon entering the form.Some of the units are non-smoking, and these suffer less wear and tear than other units. There is a $11 permonth discount on these. This item should be “unchecked” upon entering the form.The final rent box (for display of the final rent) should have the slight 3D sunken look, but because it is onlyfor display, it should NOT be a text box but a label. Important: When you create the label, one of theproperties (AutoSize) will be set to True. You will need to change this to False so that you can size the labelappropriately.Also, think about property in this control you’d need to change to get the border to have the Fixed3Dlook. Also, the text should be aligned to be centered (vertically and horizontally) within the label. (This laststatement gives a hint which property controls the alignment of the text. Figure it out.)The label above the final rent box that identifies it should be bold and slightly larger as shown. The amountthat appears inside the box should be bold and large as shown. Do not display any $ or decimal places inthe box. The box should be empty upon program start. The background color of the box should be the sameas in the sample running program–Cyan. Cyan is one of the “web” colors, which makes it easy to look up inthe VB color chart of the appropriate property.The base rent text box should be blank upon starting the program. The default area which should bedisplayed is Wavecrest.Note that the form itself should have the title “Beachport Village Rental Calculator” appearing in the title bar.Also, you should definitely include the labels you see, including the name of the complex and its slogan.The Exit button should end the program (otherwise known as “closing the form”). The Calculate Rent buttonalways needs to be pressed to determine the latest rent.Please do not vary from these specifications or your score will suffer!Hints for DevelopmentStudents should direct their Windows systems to always display file extensions for this course. This is in theWindows Explorer under Tools, Folder Options, View. Uncheck Hide File Extensions for Known FileTypes.Please save the form on your hard disk with the filename of frm plus your first initial and last name plus_bp and the extension of .vb. So for me, it would be frmKJefferies_bp.vb. For Jane Smith, it would befrmJSmith_bp.vb. You should change this from the Solution Explorer as shown in the video. Rememberalso give the form an internal name; please use frmBeachport.Remember to set initial properties using the properties window. You may also choose to explicitly set theseoptions to their defaults by supplying some code in the Form_Load event procedure, If your form is calledfrmBeachport, then the following would be the event procedure that executes upon the loading of the form:frmBeachport_Load( ). You will need to do this to set your default area combo box. Others may be donedirectly in the Properties window.6/30/2018 Assignment 5 – Beachport Rental Calculatorhttps://my.uclaextension.edu/courses/11549/assignments/162487?module_item_id=539607 3/4Development in Visual Basic is very different from C or other procedural languages. You can test yourcreation at any time by pressing F5 and running it. Do a little at a time. You will end up with severalsubroutines, but that’s the nature of Visual Basic. All of your subroutines will be Private Sub. You will NOT beusing multiple forms, Visual Basic modules, or Public subroutines. Please keep it simple. You really shouldn’tneed anything that wasn’t discussed in the lecture.Try to come up with a coherent and simple algorithm for determining the rent. It is much easier to let yourCalculate Rent button do the major work of the program than to trigger actions based on selecting one of therental options. The important thing? It had better work and give the right answer!Use the appropriate controls for the appropriate action. Base Rent is an input, so you will use a textbox for it.The final rent is just an output, so you will use a label for it. I’ll let you examine the various properties to seehow to get that “3-d recessed” look and color for the label (there are not too many choices, so you should beable to figure it out!)Please use good commenting for full style points. Name your controls other than the default (in other words,don’t use Text1, Combo1). Give meaningful names and use the naming conventions we discussed in class.Your algorithm should be simple and straightforward for full style points. If you end up doing the programin a way which creates a crazy amount (like 8) of selection statements or a big giant linear-nested if,then you are NOT doing the program the simple and direct way! Consider this: If the specs were tochange to add two more checkboxes on the form, would you program add just a couple selectionstatements? Or would you end up quadrupling the amount of code you have? If your answer is the latter,then you are approaching the program the wrong way and there will be a style deduction. Hint: Don’t thinklike what you think a “computer” thinks like. Think like a human. If you were looking at a paper form, howwould YOU calculate the rent? If you approach the program the way most people would calculate, you willhave an easy time of developing this.Because we have not yet covered variables or defined constants, you do NOT need to use variables ordefined constants to do this assignment. You can essentially use the text property of your textbox or label asa “variable”. In fact, I’d like to specifically ask you not to use variables in this program! Let’s keep it assimple as possible.Don’t worry about a formal design for this program; you won’t be handing one in. HOWEVER, you shouldstill do some quick design work. After doing the user interface, look at each control and identify to whatevents you’ll be doing something in response. Then use some form of pseudocode or N-S chart for EACH ofthese event procedures.Make sure you “clean up” your code before submission. It should look good, and not have a bunch of“empty” event procedures showing (where you erroneously double-clicked on controls and created theseprocedure shells). Leaving “empty” event procedures in your code will result in a style point reduction.What and How to SubmitYour final submission to me should be ONLY your two Visual Basic form files. Those are the files (one ofwhich was mentioned above) that contains your name. So as an example, if your name is Karen Smith, youwould submit the following two files:frmKSmith_bp.vbfrmKSmith_bp.Designer.vb
I will load these files into my own new project, build and run it, and test it for accuracy and proper operation.You will receive up to 5 points for this assignment.Critical point #1: DO NOT EVER MOVE VB FILES FROM THEIR HOME LOCATION. You will beuploading to Canvas directly from folder where your two files are resting, which is in your Documents folderunder Visual Studio (and the year). Look in Projects, then in this particular project, and inside yet anotherfolder, and you should see them there (alongside three folders called bin, MyProject, and obj).Critical point #2: Please submit only these two .vb files via Canvas in the usual manner. Please make sureyou include both of these files (and these files only!); I need both of them to be able to build an executableprogram. Without both, your submission is incomplete and I can’t possibly grade it (which means you willreceive a zero). Also if you submit a different file (the wrong one, such as the .exe or .resx or .vbproj) youwill receive a zero for the assignment. None of these files have any form information or program code, so donot submit them.Both files need to be submitted during the same submission session, and this should be done PRIOR to thedue date/time.Visual Basic doesn’t take kindly to changing filenames outside of the development environment, so if youneed to rename your files, then resave them using either the Solution Explorer method or do a Save FormAs inside the VB Development Environment.Words to the Wise (An important re-statement and re-emphasis of what I menonedabove)Start working on this program immediately with your current knowledge. It should honestly take less than 15minutes to design the form, and the same amount of time to develop the code. Really! The algorithm for thisprogram is very very simple, and the code for this program is only a few lines. If you are writing dozens oflines of code, you are doing this program the wrong way (and will suffer a bit in your style grading). If youfind that you are using a gigantic linear nested-if statement (which we haven’t covered yet), you are alsodoing this the wrong way. Think about how a human might process the form manually, and that will clue youin to the easiest way of doing the program.This is your first Visual Basic program. But you’ve been through some programming now and see what’sneeded to map the real world into some code. You saw in class the Visual Basic syntax is fairly easy, andthis program uses only the most basic of statements. The key is here to pay attention to the details. Get thenumbers right; that’s of utmost importance. Secondly, get the user interface right. Test your program! Forthose things that are a bit sticky, if you need a nudge, send me an email and I’ll try to help you out.
Reviews
There are no reviews yet.