Creating the savings and cheque accounts [closed] - c#

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 months ago.
Improve this question
You have been approached by ABC bank to develop an application that will help in managing their customers. The bank has two different types of accounts that a customer can open:
a. Check Account, a customer with a checking account typically receives interest, maintains a minimum balance, and pays service charges if the balance falls below the minimum balance. The following operations on this account are also required: set interest rate, retrieve interest rate, set minimum balance, retrieve minimum balance, set service charges, retrieve service charges, post interest, verify if the balance is less than the minimum balance, write a check, withdraw/deposit.
b. Savings Account, a customer with a savings account typically receives interest, makes deposits, and withdraws money. The following operations on this account are also required: set interest rate, retrieve interest rate, post interest, withdraw/deposit
c. The two accounts have the following things in common, they store the account number and the balance they also provide the following common operations: set the account number, retrieve the account number, retrieve the balance, deposit and withdraw money, and print account information.
d. Every account has an account holder who should have at least one account. Use your own discretion on the information you might want to include here.
Develop an application for above scenario. Use Windows Form to develop the application. Marks will be allocated for the correct use of encapsulation, inheritance and polymorphism etc. Proper naming standards must be adhered to. You are also required to submit a small test document as part of your submission where you test the functionality of the application using a list of data objects. Test at least three 3 parts of your functionality e.g., adding an account holder and creating an account for them or making a deposit or checking balance e.tc. do screen shots and include them in a word document (These details should be as detailed as possible and step by step.). Make sure to make your application as user friendly as possible i.e., the user should not be left to assume how they are supposed to operate.

Instead of posting your homework/assignment/project, please instead refine your question to be about topics you do not understand or have issues with and then post the relevant information in a new question

Related

Invitation link implementation .NET WEB API [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 days ago.
Improve this question
I`m developing .NET Web API pet application, that uses JWT authentication.
It has private rooms(lets say lobbies), so users don't have access to the list of them.
The idea is to create invitation link like https://mycoolapp.com/Room/sd1Fds/join=token,
so unauthorized user can click it and join room after he logs in.
The idea comes from discord invitation link
Like here
I want it to have expiration time, so user can choose between 3,5,7 hours for example.
Discord implementation
The question is, how should I implement it, Im currently looking at SecurityToken` class, is that right approach?
yes, the SecurityToken is a good point to start
you can create a room and generate a unique id (GUID) for that. then create a JWT token and include the generated unique id as a claim into it. then generate the invitation link including the JWT token and send it to guest
after the guest clicks on the link, redirect to the login page and then redirect to the API with the JWT token included in the query string. in the endpoint that handles the invitation link, check if everything is ok and the id exists as a claim, and the expiration time is ok, grant the user access to the private room
Personally I would go with KISS principle and just generated some random unique id (Guid.NewGuid can be sufficient) and stored it in the database with additional information (like expiration date, invited person ids, etc.) and on join attempt validated that link against the stored data (link has not expired, person attempting to join is in the list, etc.).

How to get number of cores of VM in azure [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am trying to find an api or Microsoft inbuilt functions which can help me retrieve the number of cores in a particular VM
Unfortunately there's no straight forward way to get this information.
As far as REST API go, you would need to make 2 API calls:
Get Virtual Machine: First API you would need to call is get the details about your VM using Virtual Machines - Get. The properties that are of interest to you are the location of the VM and VM Size Type.
Get Resource SKU: This is the next API you would need to call using Resource Skus - List. This will give you the details about all the VM SKUs. Now this is going to be a very long list and unfortunately very limited filtering capability is available (at least at the time of answering this question). Only filtering capability available is that by location (that's why getting location information in the 1st step is important).
Once you get the list of all available SKUs, you will need to first filter out by resourceTypes where the value is virtualMachines and name where the value is the VM Size Type obtained in the 1st step.
Once you do that, the number of cores can be obtained in vCPUs attribute under capabilities property.
Here you go:
GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/vmSizes?api-version=2019-07-01
edit: if you need it for the running VM you need to get the hardware profile of the VM and use that first call to determine the number of cores. But its kinda static, so you might as well hardcore the results

figuring out whether submissions were made on time or late [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions concerning problems with code you've written must describe the specific problem — and include valid code to reproduce it — in the question itself. See SSCCE.org for guidance.
Closed 9 years ago.
Improve this question
I have a set of requirements which I can't yet decide the best way to implement.
I have a table in the database for submissions, including the date a submission was made (Submission.Name, Submission.Date).
Each year, we want the user to make 2 submissions, one by April 1, and one by December 1
The requirements indicate that we show the user a notification on the home page, which can be one of three:
- submission completed for current period (green)
- submission pending by end of current period (blue)
- submission outstanding from previous period (red)
There is one additional rule which is that if a submission is overdue by more than 3 months, then
we should display the submission pending notification (blue) for the upcoming deadline instead of the red one.
The problem is when trying to determine if a submission that is in the first 3 months of the current period should be counted towards the current period or if it was just a late submission for the period before (which would have been overdue).
Checking previous periods for whether or not they were overdue might also require checking their previous
period ...etc. making it more complicated than I hoped.
The options so far look like either to query the table using EntityFramework to calculate the state, or to implement this logic in code, however, both options appear non-trivial so far.
Can anyone see a better approach to this kind of problem? Or does anyone have any Linq tricks to do this in one shot?
Edit: we want 2 submissions per year, but the user is free to make more than 1 submission per period, and hence why it's difficult trying to interpret how the submissions correlate back to overdue periods
Thanks in advance
Can't you just add a new field to your database, "LastSubmissionPeriod" and set it to
April 1, or December 1 so you know which period has been filled?

badges / achievements [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
i'm looking to implement a similar thing to stackoverflow badges. you could also equate them to achievements in games.
but am not sure how to design the database/code/tracking for them.
i get what i should do for badges such as:
Altruist × 1456 First bounty you manually awarded on another person's question
because they are a one time event, but how to handle others such as:
Analytical × 16389 Visited every section of the FAQ
Electorate × 1783 Voted on 600 questions and 25% or more of total votes are on questions
Outspoken × 188 Posted 10 messages in chat that were starred by 10 different users
etc...
how to handle them, how to keep track of progress for each, etc... is there a tutorial or something that can help me figure out a design pattern for them?
For the given examples, there are essentially two mechanisms you are going to need.
I don't know how it's done on SO, this is just a suggestion of a solution.
Let's look at 'Analytical' first. You are going to have to record by means of a simple flag when a user visits a particular area in the FAQ. Let's envisage a DB table with a field for each FAQ section and a user ID. This starts off as "N" (or 0, or however you want to represent your flag). When a user visits that area, you call code to flip that field to "Y". When all fields are "Y" then you can award that badge.
As for 'electorate' and 'Outspoken', you can retrieve this information by means of a query on your existing data, assuming the queries themseves are not too burdensome. You are going to need to consider when to run these checks. This essentially boils down to two options.
1) When the an action is performed that might get a badge awarded (i.e. visit section of FAQ, Vote on a Question, Question starred by someone else)
2) Periodically (hourly, daily, etc) run a check for all your badges against current data.
Bear in mind that badges are one-way in Stackoverflow, so if you are wanting to be equivalent then you don't have to consider logic to 'un-award' badges.

Automated letter generation [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I work for a doctor and am looking for a solution to speed up his process of composing medical reports. Most of the text in the medical reports are redundant and should be able to be generated by a selection process
What I would like is to present him with a form with various options, checkboxes and the selections he makes will drive the generation of the report and create a word document that he can then fine tune or just save/print/whatever.
For instance he will be prompted with:
Age: ______
Gender : () Male, () Female
Length of Condition : () Week () Month () Year
Pain involving: [] Neck, [] Shoulder, [] Chest, [] Hip, [] Leg, etc....
This subset of the form would generate the following sentence:
"This is a 38 year old woman with a month history of pain in the leg"
I'd like the process to be data driven (as much as possible), so changes to the selection choices don't require reprogramming.
I would suspect that he is not the first person to ask for a system like this. So my first question is has anybody come across any existing software that we can purchase that would meet our needs?
In the event that no pre-packaged software is out there, I'd like some input as to general design strategies. What kind of data structure would you use to store the choices? How do I interface with word to create the document?
If I were to write this myself my language of choice would be C#.
EDIT:
A number of suggestion where made assuming that I'm looking for a Medical records package.
I don't think that is a solution to the problem I'm addressing.
The doctor is simply looking for a tool to automate his report writing. His reports are usually submitted as part of a workmans comp or no-fault case. They are for external consumption, and not usually not referred back to internally after the fact.
ANOTHER POINT:
The functionality I'm looking for isn't specific to the medical community. I'm looking for a tool where a given checkbox/radio button generates a specific sentence, and the mapping is configured by the user. Sort of a form letter on steriods.
Yes, there is definitely software out there that does this. You're looking for medical records software. The specifics of the software really depend on where the doctor is located, however. Because your profile indicates a New York location, I assume that you're in the United States. In that case, I know of exactly one offering in that domain. Perhaps they will or won't fit your needs (I've never worked with it myself), but NexTech certainly has a commercial product offering in that general market segment.
If you choose to build your own (which is always a possibility), be aware of the fact that there are legal requirements that surround such software. Once again, I'm not aware of specifics, but you may need to talk with the owner of the practice to ensure that your software doesn't violate any relevant privacy laws.
We automate creation of sales tax returns using open source PDF libraries. We're on Java, but here are some options for PDF generation on .Net.
In our case we work with a specific form template that the states provide and fill in amounts programaticly. It sounds like you're looking to accomplish something very similar.
You may want to have a look at medical, an electronic health record module for Open ERP. There are also a variety of commercial packages out there; e-MDs, for example, provides this specific feature.
I know Epic is a big player in this area, but they may be out of your price range.
I can think of these options:
XMLFO
Mail-Merge with MS Word
With the risk of being shot, but: That sounds like something that Microsoft Access was created for. You can easily generate the Form and Report. If you really need it as a Word Document (as opposed to simply using Access' Report function) you can link Word Documents to Access databases.
Just an idea.
I think you can just set this up in Word using fields. And the Doctor would just tab from field to field.

Categories