Visual basic your job is to use Select Case Blocks and Do/For Loops to design a
ID: 3600850 • Letter: V
Question
Visual basic
your job is to use Select Case Blocks and Do/For Loops to design a clock and calendar interface. So that we are on the same page, here are some parameters:
You need not make a representation of a clock. All you need to do is output the current time and date (such as 11:16 AM on Thursday October 19, 2017). I am aware that there are functions that do this, but I do not want you to use them directly. Clocks and calendars are the perfect example to build these constructions.
1. Start your program by asking the user to input the current weekday (as a word), month (as a number), day, year, and time (in hours, minutes, seconds, and the AM/PM designation). Each of these individual elements should be entered in a separate spot.
2. Use a select case block to handle the original assignment of a day counter from the weekday entered. Sunday should be 0, Monday 1, etc. You will use this counter and a Mod function to determine for the future which weekday it is.
3. Determine if it is a leap year. If it is divisible by 4, then it is.
4. Write a select case block that manages how many days the current month has. Remember that for February, this is dependent upon whether or not it is a leap year.
5. Since a clock runs indefinitely, the entire process after the initial entry should be a Do Loop (which serves the purpose of the years). Make this Do Loop a subroutine so that the inputs must come first.
6. Since the mechanisms of a clock and a calendar are finitely driven (they have predictable ends), these should be managed by a nested For Loop. The order in which the nesting should occur should be year, month, day, hour, minute, second.
7. For reference, here are the bounds:
-Months have variable numbers of days: January - 31, February - 28 (29 in leap year), March - 31, April - 30, May - 31, June - 30, July - 31, August - 31, September - 30, October - 31, November - 30, December - 31
-A day has 24 hours. AM and PM flips on the attainment of 12 (12 AM is midnight, 12 PM is noon)
-An hour has 60 minutes
-A minute has 60 seconds
Use the following to manage a second:
Start the clock by using a button. The button when you code it will contain all of the code. Normally a button will have an action that will start with Private Sub ...
Start the button instead with this: Private Async Sub ... (so in other words, type Async in between Private and Sub on your button)
Now, just to clarify (as I have had people get tripped up on this):
The whole process within the button (after the population of the current time) is a Do Loop. WITHIN that Do Loop, you will have a group of For Loops. I highly suggest working out the seconds, and then building the loop around it for minutes, and then for hours, etc.
To make your system wait one second, this is the best approach. I misled you, and for that I apologize:
Use the command Await Task.Delay(1000)
This makes it wait exactly one second before anything else occurs.
Hints:
Manage AM and PM as an IF statement within the loop (when the 12th hour is attained, flip it)
Write your For loop bounds regarding days with an initial value of 1 and a terminal value of numberOfDays. That way, the Select Case Block can help you to only have to handle this once. Do not forget to add one to the initial counter to help you with displaying the correct day of the week.
Your indexing variables will be used to help make decisions (such as how many days the month has, does AM/PM flip, and that the 13th hour of the day is 1 PM). This does not mean that they will be modified, but rather that they will be essential to decisions along the way.
This process will go on and on and on. To end it, just close the form window.
A good way to do this process is iteratively. Start with seconds. Make sure it works. Then build minutes around it. Then build hours around it.
Your for loops will start at the input time. As a consequence, you will need to manage what happens when the end is attained. In other words, you need to reset the subroutine's parameter variables because the index will need that on successive passes of the do loop.
please show code and a screen shot of program
Explanation / Answer
After a few years of sticking with essentially the same design, Google Calendar on the web is getting a makeover today. That means a fresh new color palette and a design in line with Google’s Material Design scheme, but also — and more importantly — a responsive layout that smartly adjusts your calendar to the size of your browser window.
This update isn’t just about giving Calendar a fresh coat of paint, there are also a number of feature updates here that’ll make using the service a bit easier. If you work in a large company, then Calendar can now show you more details about your organization’s meeting rooms, for example (where it is, what AV equipment is there, etc.), after your admins put this info into the system.
Another new feature is the side-by-side “Day” view that allows you to view and manage calendars in separate columns without having to scroll. I don’t think that’s something most users will ever need, but Google argues that it’s great for employees who manage multiple calendars, including administrative assistants, to schedule meetings for the whole team.
In addition to these marquee updates, the new Google Calendar also features the ability to see more information about meeting participants when you hover over a calendar invite and an easier way to share a calendar with a group. You also now get the option to view and restore deleted items in case you accidentally delete that invite to the one meeting that would actually have been productive.
Starting today, G Suite admins can enable these new features and individual users can click the “Use new Calendar” link in the upper righthand corner of the Calendar view to get started (or you could just click here — which is even easier
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.